All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Local checksum offload for VXLAN
@ 2015-12-17 15:27 Edward Cree
  2015-12-17 15:29 ` [PATCH net-next 1/2] net: udp: local checksum offload for encapsulation Edward Cree
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Edward Cree @ 2015-12-17 15:27 UTC (permalink / raw)
  To: David Miller; +Cc: Tom Herbert, netdev

When the inner packet checksum is offloaded, the outer UDP checksum is easy
 to calculate as it doesn't depend on the payload (because the inner checksum
 cancels out everything from the inner packet except the pseudo header).
Thus, transmit checksums for VXLAN (and in principle other encapsulations,
 but I haven't enabled it for / tested with those) can be offloaded on any
 device supporting NETIF_F_HW_CSUM.  Only the innermost checksum has to be
 offloaded, the rest are filled in by the stack.
Tested by hacking a driver to report NETIF_F_HW_CSUM, call skb_checksum_help
 before transmitting a packet, and not actually offload anything to the hw.
In principle it should also be possible to apply this technique when the
 inner packet has been checksummed by software, but only if skb->csum_start
 and skb->csum_offset have been filled in to describe the inner checksum.
 However in this case it is easier to use skb->csum and skb->csum_start, as
 gso_make_checksum() already does - a similar but simpler technique.  It's
 not clear to me where else this should be done, so this is out of scope for
 this patch series.

Edward Cree (2):
  net: udp: local checksum offload for encapsulation
  net: vxlan: enable local checksum offload on HW_CSUM devices

 drivers/net/vxlan.c |  5 ++++-
 net/ipv4/udp.c      | 34 +++++++++++++++++++++++++++++-----
 2 files changed, 33 insertions(+), 6 deletions(-)

-- 
2.4.3

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

end of thread, other threads:[~2016-01-06 19:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17 15:27 [PATCH net-next 0/2] Local checksum offload for VXLAN Edward Cree
2015-12-17 15:29 ` [PATCH net-next 1/2] net: udp: local checksum offload for encapsulation Edward Cree
2015-12-17 15:30 ` [PATCH net-next 2/2] net: vxlan: enable local checksum offload on HW_CSUM devices Edward Cree
2015-12-17 18:06 ` [PATCH net-next 0/2] Local checksum offload for VXLAN Tom Herbert
2015-12-18 10:41   ` Edward Cree
2015-12-18 19:41     ` Tom Herbert
2016-01-06 19:23       ` Edward Cree
2015-12-26  4:41   ` 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.