Skip to contentSkip to conversation

cxgb3 - private ioctl cleanup

PATCH Superseded [email protected] 2 participants 6 messages Feb 22, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/7 cxgb3 - private ioctl cleanup

From: Divy Le Ray <[email protected]>

Clean up some private ioctls.

---

 drivers/net/cxgb3/cxgb3_ioctl.h |   21 ++++-------------
 drivers/net/cxgb3/cxgb3_main.c  |   48 +++------------------------------------
 2 files changed, 9 insertions(+), 60 deletions(-)
drivers/net/cxgb3/cxgb3_ioctl.h +5 -16
index a942818..42d4bf6 100644
@@ -36,28 +36,17 @@
  * Ioctl commands specific to this driver.
  */
 enum {
-	CHELSIO_SETREG = 1024,
-	CHELSIO_GETREG,
-	CHELSIO_SETTPI,
-	CHELSIO_GETTPI,
-	CHELSIO_GETMTUTAB,
+	CHELSIO_GETMTUTAB = 1024,
 	CHELSIO_SETMTUTAB,
-	CHELSIO_GETMTU,
-	CHELSIO_SET_PM,
-	CHELSIO_GET_PM,
-	CHELSIO_GET_TCAM,
-	CHELSIO_SET_TCAM,
-	CHELSIO_GET_TCB,
 	CHELSIO_GET_MEM,
 	CHELSIO_LOAD_FW,
-	CHELSIO_GET_PROTO,
-	CHELSIO_SET_PROTO,
 	CHELSIO_SET_TRACE_FILTER,
-	CHELSIO_SET_QSET_PARAMS,
 	CHELSIO_GET_QSET_PARAMS,
-	CHELSIO_SET_QSET_NUM,
+	CHELSIO_SET_QSET_PARAMS,
 	CHELSIO_GET_QSET_NUM,
-	CHELSIO_SET_PKTSCHED,
+	CHELSIO_SET_QSET_NUM,
+	CHELSIO_GET_PM,
+	CHELSIO_SET_PM,
 };
 
 struct ch_reg {
drivers/net/cxgb3/cxgb3_main.c +4 -44

66 lines not on this page · raw message

#1 lore raw

In article <[email protected]> (at Thu, 22 Feb 2007 03:59:25 -0800), [email protected] says:

Quoted 38 lines

From: Divy Le Ray <[email protected]>

Clean up some private ioctls.

---

 drivers/net/cxgb3/cxgb3_ioctl.h |   21 ++++-------------
 drivers/net/cxgb3/cxgb3_main.c  |   48 +++------------------------------------
 2 files changed, 9 insertions(+), 60 deletions(-)
drivers/net/cxgb3/cxgb3_ioctl.h +1 -14
index a942818..42d4bf6 100644
@@ -36,28 +36,17 @@
  * Ioctl commands specific to this driver.
  */
 enum {
-	CHELSIO_SETREG = 1024,
-	CHELSIO_GETREG,
-	CHELSIO_SETTPI,
-	CHELSIO_GETTPI,
-	CHELSIO_GETMTUTAB,
+	CHELSIO_GETMTUTAB = 1024,
 	CHELSIO_SETMTUTAB,
-	CHELSIO_GETMTU,
-	CHELSIO_SET_PM,
-	CHELSIO_GET_PM,
-	CHELSIO_GET_TCAM,
-	CHELSIO_SET_TCAM,
-	CHELSIO_GET_TCB,
 	CHELSIO_GET_MEM,
 	CHELSIO_LOAD_FW,
-	CHELSIO_GET_PROTO,
-	CHELSIO_SET_PROTO,
 	CHELSIO_SET_TRACE_FILTER,
-	CHELSIO_SET_QSET_PARAMS,

drivers/net/cxgb3/cxgb3_ioctl.h line 51

Quoted 10 lines
drivers/net/cxgb3/cxgb3_ioctl.h +4 -2
 	CHELSIO_GET_QSET_PARAMS,
-	CHELSIO_SET_QSET_NUM,
+	CHELSIO_SET_QSET_PARAMS,
 	CHELSIO_GET_QSET_NUM,
-	CHELSIO_SET_PKTSCHED,
+	CHELSIO_SET_QSET_NUM,
+	CHELSIO_GET_PM,
+	CHELSIO_SET_PM,
 };
 

I disagree. This is very bad.

1. Please do do change the values.
2. Explain why you are going to kill these ioctls.

Regards,

--yoshfuji

#2 lore raw

Hi Yoshfuji,

Quoted 52 lines
Quoted 39 lines

From: Divy Le Ray <[email protected]>

Clean up some private ioctls.

---

 drivers/net/cxgb3/cxgb3_ioctl.h |   21 ++++-------------
 drivers/net/cxgb3/cxgb3_main.c  |   48 +++------------------------------------
 2 files changed, 9 insertions(+), 60 deletions(-)
drivers/net/cxgb3/cxgb3_ioctl.h +1 -14
index a942818..42d4bf6 100644
@@ -36,28 +36,17 @@
  * Ioctl commands specific to this driver.
  */
 enum {
-	CHELSIO_SETREG = 1024,
-	CHELSIO_GETREG,
-	CHELSIO_SETTPI,
-	CHELSIO_GETTPI,
-	CHELSIO_GETMTUTAB,
+	CHELSIO_GETMTUTAB = 1024,
 	CHELSIO_SETMTUTAB,
-	CHELSIO_GETMTU,
-	CHELSIO_SET_PM,
-	CHELSIO_GET_PM,
-	CHELSIO_GET_TCAM,
-	CHELSIO_SET_TCAM,
-	CHELSIO_GET_TCB,
 	CHELSIO_GET_MEM,
 	CHELSIO_LOAD_FW,
-	CHELSIO_GET_PROTO,
-	CHELSIO_SET_PROTO,
 	CHELSIO_SET_TRACE_FILTER,
-	CHELSIO_SET_QSET_PARAMS,
 	CHELSIO_GET_QSET_PARAMS,

drivers/net/cxgb3/cxgb3_ioctl.h line 52

Quoted 10 lines
drivers/net/cxgb3/cxgb3_ioctl.h +4 -2
-	CHELSIO_SET_QSET_NUM,
+	CHELSIO_SET_QSET_PARAMS,
 	CHELSIO_GET_QSET_NUM,
-	CHELSIO_SET_PKTSCHED,
+	CHELSIO_SET_QSET_NUM,
+	CHELSIO_GET_PM,
+	CHELSIO_SET_PM,
 };
 
 

I disagree. This is very bad.

Quoted 3 lines

1. Please do do change the values.
2. Explain why you are going to kill these ioctls.

Jeff and Arjan have required that most of these ioctls go. Please read:
http://marc.theaimsgroup.com/?l=linux-netdev&m=117029584904193&w=2

Cheers,
Divy

#3 lore raw

In article <[email protected]> (at Thu, 22 Feb 2007 04:34:34 -0800), Divy Le Ray <[email protected]> says:

Quoted 6 lines
Quoted 3 lines

1. Please do do change the values.
2. Explain why you are going to kill these ioctls.

Jeff and Arjan have required that most of these ioctls go. Please read:
http://marc.theaimsgroup.com/?l=linux-netdev&m=117029584904193&w=2

Even if you remove them, PLEASE DO NOT CHANGE THE VALUES, unless you have very, very good reason.

--yoshfuji

#4 lore raw
Quoted 8 lines · YOSHIFUJI Hideaki / $B5HF#1QL@ wrote:

In article <[email protected]> (at Thu, 22 Feb 2007 04:34:34 -0800), Divy Le Ray <[email protected]> says:

Quoted 4 lines
Quoted 4 lines

1. Please do do change the values.
2. Explain why you are going to kill these ioctls.

Quoted 8 lines
Quoted 4 lines

Jeff and Arjan have required that most of these ioctls go. Please read:
http://marc.theaimsgroup.com/?l=linux-netdev&m=117029584904193&w=2

Even if you remove them, PLEASE DO NOT CHANGE THE VALUES, unless you have very, very good reason.

The cxgb3 driver has not yet appeared in a stable version of the linux kernel. The odds of breaking an application using these private ioctls are pretty slim. Since some cleanup was required, I chose not to let holes between the values.

Cheers,
Divy

#5 lore raw

In article <[email protected]> (at Thu, 22 Feb 2007 04:50:05 -0800), Divy Le Ray <[email protected]> says:

Quoted 2 lines
Quoted 2 lines

Even if you remove them, PLEASE DO NOT CHANGE THE VALUES, unless you have very, very good reason.

:

Quoted 6 lines

The cxgb3 driver has not yet appeared in a stable version of the linux kernel.
The odds of breaking an application using these private ioctls are pretty slim.
Since some cleanup was required, I chose not to let holes between the values.

Even so, if I were you, I would not have changed them and I would even try keeping compatibility with old (out-kernel) drivers.

--yoshfuji