Re: [PATCH net-2.6.24] cxgb3 - napi update

Previous thread: Re: broken ACPI NUMA config option by James C. Georgas on Saturday, September 8, 2007 - 10:36 pm. (2 messages)

Next thread: [patch 0/3] Reflect recent changes in kdump documentation by Bernhard Walle on Sunday, September 9, 2007 - 4:06 am. (1 message)
To: <davem@...>
Cc: <jeff@...>, <netdev@...>, <linux-kernel@...>, <swise@...>
Date: Sunday, September 9, 2007 - 3:09 am

From: Divy Le Ray <divy@chelsio.com>

Embed napi_struct directly into sge_qset.
Use napi_schedule/napi_complete.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
---

drivers/net/cxgb3/adapter.h | 20 +++-------
drivers/net/cxgb3/cxgb3_main.c | 57 ++++++++++--------------------
drivers/net/cxgb3/sge.c | 77 +++++++++++++++-------------------------
3 files changed, 55 insertions(+), 99 deletions(-)

diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h
index e723e7b..0442617 100644
--- a/drivers/net/cxgb3/adapter.h
+++ b/drivers/net/cxgb3/adapter.h
@@ -49,11 +49,13 @@
typedef irqreturn_t(*intr_handler_t) (int, void *);

struct vlan_group;
-
struct adapter;
+struct sge_qset;
+
struct port_info {
struct adapter *adapter;
struct vlan_group *vlan_grp;
+ struct sge_qset *qs;
const struct port_type_info *port_type;
u8 port_id;
u8 rx_csum_offload;
@@ -172,12 +174,12 @@ enum { /* per port SGE statistics */
SGE_PSTAT_MAX /* must be last */
};

-struct adapter_napi;
struct sge_qset { /* an SGE queue set */
+ struct adapter *adap;
+ struct napi_struct napi;
struct sge_rspq rspq;
struct sge_fl fl[SGE_RXQ_PER_SET];
struct sge_txq txq[SGE_TXQ_PER_SET];
- struct adapter_napi *anapi;
struct net_device *netdev;
unsigned long txq_stopped; /* which Tx queues are stopped */
struct timer_list tx_reclaim_timer; /* reclaims TX buffers */
@@ -189,13 +191,6 @@ struct sge {
spinlock_t reg_lock; /* guards non-atomic SGE registers (eg context) */
};

-struct adapter_napi {
- struct napi_struct napi;
- struct adapter *adapter;
- int port;
- int qset;
-};
-
struct adapter {
struct t3cdev tdev;
struct list_head adapter_list;
@@ -230,8 +225,6 @@ struct adapter {
struct delayed_work adap_check_task;
struct work_struct ext_intr_handler_task;

- struct adapter_napi napi[SGE_QSETS];
-
struct dentry *debugfs_root;

struct mutex mdio_lock;
@@ -283,8 +276,7 @@ int t3_mgmt_tx(struct ad...

To: <divy@...>
Cc: <jeff@...>, <netdev@...>, <linux-kernel@...>, <swise@...>
Date: Wednesday, September 12, 2007 - 10:55 am

From: Divy Le Ray <divy@chelsio.com>

Patch applied, thanks a lot!
-

Previous thread: Re: broken ACPI NUMA config option by James C. Georgas on Saturday, September 8, 2007 - 10:36 pm. (2 messages)

Next thread: [patch 0/3] Reflect recent changes in kdump documentation by Bernhard Walle on Sunday, September 9, 2007 - 4:06 am. (1 message)