niu: Add GRO support.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, March 30, 2009 - 7:00 pm

Gitweb:     http://git.kernel.org/linus/4099e01224e2afcaeea439cd92db3e7cf6e0f84f
Commit:     4099e01224e2afcaeea439cd92db3e7cf6e0f84f
Parent:     129dd9677b30a07bb832247dfe8d6089f1ac61a0
Author:     David S. Miller <davem@davemloft.net>
AuthorDate: Sun Mar 29 01:39:41 2009 -0700
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Sun Mar 29 01:39:41 2009 -0700

    niu: Add GRO support.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/niu.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 50c1112..02c37e2 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3441,7 +3441,8 @@ static int niu_rx_pkt_ignore(struct niu *np, struct rx_ring_info *rp)
 	return num_rcr;
 }
 
-static int niu_process_rx_pkt(struct niu *np, struct rx_ring_info *rp)
+static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
+			      struct rx_ring_info *rp)
 {
 	unsigned int index = rp->rcr_index;
 	struct sk_buff *skb;
@@ -3518,7 +3519,7 @@ static int niu_process_rx_pkt(struct niu *np, struct rx_ring_info *rp)
 
 	skb->protocol = eth_type_trans(skb, np->dev);
 	skb_record_rx_queue(skb, rp->rx_channel);
-	netif_receive_skb(skb);
+	napi_gro_receive(napi, skb);
 
 	return num_rcr;
 }
@@ -3706,7 +3707,8 @@ static inline void niu_sync_rx_discard_stats(struct niu *np,
 	}
 }
 
-static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
+static int niu_rx_work(struct napi_struct *napi, struct niu *np,
+		       struct rx_ring_info *rp, int budget)
 {
 	int qlen, rcr_done = 0, work_done = 0;
 	struct rxdma_mailbox *mbox = rp->mbox;
@@ -3728,7 +3730,7 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
 	rcr_done = work_done = 0;
 	qlen = min(qlen, budget);
 	while (work_done < qlen) {
-		rcr_done += niu_process_rx_pkt(np, rp);
+		rcr_done += niu_process_rx_pkt(napi, np, rp);
 		work_done++;
 	}
 
@@ -3776,7 +3778,7 @@ static int niu_poll_core(struct niu *np, struct niu_ldg *lp, int budget)
 		if (rx_vec & (1 << rp->rx_channel)) {
 			int this_work_done;
 
-			this_work_done = niu_rx_work(np, rp,
+			this_work_done = niu_rx_work(&lp->napi, np, rp,
 						     budget);
 
 			budget -= this_work_done;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
niu: Add GRO support., Linux Kernel Mailing ..., (Mon Mar 30, 7:00 pm)