All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/4] Fix checksum error when using stacked vlan
@ 2015-01-29 11:37 Toshiaki Makita
  2015-01-29 11:37 ` [PATCH net 1/4] net: Fix vlan_get_protocol for " Toshiaki Makita
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Toshiaki Makita @ 2015-01-29 11:37 UTC (permalink / raw)
  To: David S . Miller, Linux NICS; +Cc: e1000-devel, netdev, Toshiaki Makita

When I was testing 802.1ad, I found several drivers don't take into
account 802.1ad or multiple vlans when retrieving L3 (IP/IPv6) or
L4 (TCP/UDP) protocol for checksum offload.

It is mainly due to vlan_get_protocol(), which extracts ether type only
when it is tagged with single 802.1Q. When 802.1ad is used or there are
multiple vlans, it extracts vlan protocol and drivers cannot determine
which L3/L4 protocol is used.

Those drivers, most of which have IP_CSUM/IPV6_CSUM features, get L3/L4
header-offset by software, so it seems that their checksum offload works
with multiple vlans if we can parse protocols correctly.
(They know mac header length, and probably don't care about what is in it.)

And another thing, some of Intel's drivers seem to use skb->protocol where
vlan_get_protocol() is more suitable.

I tested that at least igb/igbvf on I350 works with this patch set.

Note:
We can hand a double tagged packet with CHECKSUM_PARTIAL to a HW driver
by creating a vlan device on a bridge device and enabling vlan_filtering
of the bridge with 802.1ad protocol.

Toshiaki Makita (4):
  net: Fix vlan_get_protocol for stacked vlan
  igbvf: Fix checksum error when using stacked vlan
  ixgbe: Fix checksum error when using stacked vlan
  ixgbevf: Fix checksum error when using stacked vlan

 drivers/net/ethernet/intel/igbvf/netdev.c         | 19 ++++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c     |  2 +-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |  4 +-
 include/linux/if_vlan.h                           | 60 +++++++++++++++++------
 net/core/dev.c                                    | 31 +-----------
 5 files changed, 61 insertions(+), 55 deletions(-)

-- 
1.8.1.2



------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-31  2:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 11:37 [PATCH net 0/4] Fix checksum error when using stacked vlan Toshiaki Makita
2015-01-29 11:37 ` [PATCH net 1/4] net: Fix vlan_get_protocol for " Toshiaki Makita
2015-01-29 11:37 ` [PATCH net 2/4] igbvf: Fix checksum error when using " Toshiaki Makita
2015-01-29 11:37 ` [PATCH net 3/4] ixgbe: " Toshiaki Makita
2015-01-29 11:37 ` [PATCH net 4/4] ixgbevf: " Toshiaki Makita
2015-01-31  2:04 ` [PATCH net 0/4] " David Miller

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.