pktgen: Add UDPCSUM flag to support UDP checksums
authorThomas Graf <tgraf@suug.ch>
Thu, 25 Jul 2013 16:12:18 +0000 (18:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Jul 2013 05:16:36 +0000 (22:16 -0700)
commitc26bf4a51308c85a6f97628253b99767a84ff90a
tree5c59f55f34fe58225fd37789ce14689d2c4005b9
parent82a54d0ebbee03a8dcf4e1e4016a53fed4d6c933
pktgen: Add UDPCSUM flag to support UDP checksums

UDP checksums are optional, hence pktgen has been omitting them in
favour of performance. The optional flag UDPCSUM enables UDP
checksumming. If the output device supports hardware checksumming
the skb is prepared and marked CHECKSUM_PARTIAL, otherwise the
checksum is generated in software.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/udp.h
net/core/pktgen.c
net/ipv4/udp.c