From: Stephen Hemminger <shemminger@vyatta.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 8/9] sky2: add GRO support
Date: Wed, 17 Jun 2009 10:30:39 -0700 [thread overview]
Message-ID: <20090617173140.297221387@vyatta.com> (raw)
In-Reply-To: 20090617173031.703636683@vyatta.com
[-- Attachment #1: sky2-gro.patch --]
[-- Type: text/plain, Size: 1407 bytes --]
Add support for generic receive offload.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/sky2.c 2009-06-17 10:29:58.250810500 -0700
+++ b/drivers/net/sky2.c 2009-06-17 10:29:59.249757381 -0700
@@ -2373,6 +2373,26 @@ static inline void sky2_tx_done(struct n
}
}
+static inline void sky2_skb_rx(const struct sky2_port *sky2,
+ u32 status, struct sk_buff *skb)
+{
+#ifdef SKY2_VLAN_TAG_USED
+ u16 vlan_tag = be16_to_cpu(sky2->rx_tag);
+ if (sky2->vlgrp && (status & GMR_FS_VLAN)) {
+ if (skb->ip_summed == CHECKSUM_NONE)
+ vlan_hwaccel_receive_skb(skb, sky2->vlgrp, vlan_tag);
+ else
+ vlan_gro_receive(&sky2->hw->napi, sky2->vlgrp,
+ vlan_tag, skb);
+ return;
+ }
+#endif
+ if (skb->ip_summed == CHECKSUM_NONE)
+ netif_receive_skb(skb);
+ else
+ napi_gro_receive(&sky2->hw->napi, skb);
+}
+
static inline void sky2_rx_done(struct sky2_hw *hw, unsigned port,
unsigned packets, unsigned bytes)
{
@@ -2438,14 +2458,7 @@ static int sky2_status_intr(struct sky2_
skb->protocol = eth_type_trans(skb, dev);
-#ifdef SKY2_VLAN_TAG_USED
- if (sky2->vlgrp && (status & GMR_FS_VLAN)) {
- vlan_hwaccel_receive_skb(skb,
- sky2->vlgrp,
- be16_to_cpu(sky2->rx_tag));
- } else
-#endif
- netif_receive_skb(skb);
+ sky2_skb_rx(sky2, status, skb);
/* Stop after net poll weight */
if (++work_done >= to_do)
--
next prev parent reply other threads:[~2009-06-17 17:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 17:30 [PATCH 0/9] sky2 driver patches Stephen Hemminger
2009-06-17 17:30 ` [PATCH 1/9] sky2: turn off pause during shutdown Stephen Hemminger
2009-06-18 1:50 ` David Miller
2009-06-17 17:30 ` [PATCH 2/9] sky2: more receive shutdown Stephen Hemminger
2009-06-18 1:50 ` David Miller
2009-06-20 7:14 ` Graham Murray
2009-06-22 5:13 ` Graham Murray
2009-06-17 17:30 ` [PATCH 3/9] sky2: PCI irq issues Stephen Hemminger
2009-06-18 1:50 ` David Miller
2009-06-17 17:30 ` [PATCH 4/9] sky2: fix shutdown synchronization Stephen Hemminger
2009-06-18 1:50 ` David Miller
2009-06-18 23:25 ` Mike McCormack
2009-06-18 23:41 ` Stephen Hemminger
2009-06-18 23:53 ` Mike McCormack
2009-06-17 17:30 ` [PATCH 5/9] sky2: receive counter update Stephen Hemminger
2009-06-18 1:51 ` David Miller
2009-06-17 17:30 ` [PATCH 6/9] sky2: reduce default transmit ring Stephen Hemminger
2009-06-18 1:51 ` David Miller
2009-06-17 17:30 ` [PATCH 7/9] sky2: skb recycling Stephen Hemminger
2009-06-18 1:51 ` David Miller
2009-06-18 21:13 ` Brandeburg, Jesse
2009-06-18 21:22 ` Stephen Hemminger
2009-06-17 17:30 ` Stephen Hemminger [this message]
2009-06-18 1:52 ` [PATCH 8/9] sky2: add GRO support David Miller
2009-06-17 17:30 ` [PATCH 9/9] sky2: version 1.23 Stephen Hemminger
2009-06-18 1:52 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090617173140.297221387@vyatta.com \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.