Thread (18 messages) flat view 18 messages, 5 authors, 2012-12-07

Re: [PATCH v3 1/4] net: Add support for hardware-offloaded encapsulation

From: Alexander Duyck <hidden>
Date: 2012-12-07 16:45:25
Also in: lkml

On 12/07/2012 02:07 AM, Ben Hutchings wrote:
On Thu, 2012-12-06 at 17:56 -0800, Joseph Gasparakis wrote:
quoted
This patch adds support in the kernel for offloading in the NIC Tx and Rx
checksumming for encapsulated packets (such as VXLAN and IP GRE).
[...]
quoted
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1063,6 +1063,8 @@ struct net_device {
 	netdev_features_t	wanted_features;
 	/* mask of features inheritable by VLAN devices */
 	netdev_features_t	vlan_features;
+	/* mask of features inherited by encapsulating devices */
+	netdev_features_t	hw_enc_features;
[...]

How will the networking core know *which* encapsulations this applies
to?  I notice that your implementation in ixgbe does not set
NETIF_F_HW_CSUM here, so presumably the hardware will parse headers to
find which ranges should be checksummed and it won't cover the next
encapsulation protocol that comes along.

Ben.
Actually the offload is generic to any encapsulation that does not
compute a checksum on the inner headers.  So as long as you can treat
the outer headers as one giant L2 header you can pretty much ignore what
is in there as long as the inner network and transport header values are
set.  There are a number of tunnels that fall into that category since
most just use IP as the L2 and the L3 usually doesn't contain any checksum.

Thanks,

Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help