diff options
author | Jay Jayatheerthan <jay.jayatheerthan@intel.com> | 2019-12-20 14:25:29 +0530 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-12-20 16:10:39 -0800 |
commit | 4a3c23ae3acc6185a9d418830f22672a52ff986a (patch) | |
tree | abe2b6d44e23d7c9735db6b44cb9bfd87d12827d /Documentation/CodingStyle | |
parent | ece6e9694751a4f0b99372724a0705a0217132b3 (diff) | |
download | linux-stable-4a3c23ae3acc6185a9d418830f22672a52ff986a.tar.gz linux-stable-4a3c23ae3acc6185a9d418830f22672a52ff986a.tar.bz2 linux-stable-4a3c23ae3acc6185a9d418830f22672a52ff986a.zip |
samples/bpf: xdpsock: Add option to specify tx packet size
New option '-s' or '--tx-pkt-size' has been added to specify the transmit
packet size. The packet size ranges from 47 to 4096 bytes. When this
option is not provided, it defaults to 64 byte packet.
The code uses struct ethhdr, struct iphdr and struct udphdr to form the
transmit packet. The MAC address, IP address and UDP ports are set to default
values.
The code calculates IP and UDP checksums before sending the packet.
Checksum calculation code in Linux kernel is used for this purpose.
The Ethernet FCS is not filled by the code.
Signed-off-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191220085530.4980-6-jay.jayatheerthan@intel.com
Diffstat (limited to 'Documentation/CodingStyle')
0 files changed, 0 insertions, 0 deletions