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>
This commit is contained in:

committed by
David S. Miller

parent
82a54d0ebb
commit
c26bf4a513
@@ -183,6 +183,7 @@ extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
|
||||
struct msghdr *msg, size_t len);
|
||||
extern int udp_push_pending_frames(struct sock *sk);
|
||||
extern void udp_flush_pending_frames(struct sock *sk);
|
||||
extern void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst);
|
||||
extern int udp_rcv(struct sk_buff *skb);
|
||||
extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
|
||||
extern int udp_disconnect(struct sock *sk, int flags);
|
||||
|
Reference in New Issue
Block a user