<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/samples/bpf/xdpsock_user.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-29T09:07:33Z</updated>
<entry>
<title>samples/bpf: Fix to xdpsock to avoid recycling frames</title>
<updated>2020-10-29T09:07:33Z</updated>
<author>
<name>Weqaar Janjua</name>
</author>
<published>2020-08-28T16:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91c8e9e1858012a160284dba1c4c9337fc3d7f05'/>
<id>urn:sha1:91c8e9e1858012a160284dba1c4c9337fc3d7f05</id>
<content type='text'>
[ Upstream commit b69e56cf765155dcac0037d7d0f162a2afab76c2 ]

The txpush program in the xdpsock sample application is supposed
to send out all packets in the umem in a round-robin fashion.
The problem is that it only cycled through the first BATCH_SIZE
worth of packets. Fixed this so that it cycles through all buffers
in the umem as intended.

Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access")
Signed-off-by: Weqaar Janjua &lt;weqaar.a.janjua@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20200828161717.42705-1-weqaar.a.janjua@intel.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>samples: bpf: Allow for -ENETDOWN in xdpsock</title>
<updated>2020-02-05T21:06:09Z</updated>
<author>
<name>Maciej Fijalkowski</name>
</author>
<published>2020-02-05T04:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ed47e140867a6e7d56170f325c8d4fdee6d6b66'/>
<id>urn:sha1:8ed47e140867a6e7d56170f325c8d4fdee6d6b66</id>
<content type='text'>
ndo_xsk_wakeup() can return -ENETDOWN and there's no particular reason
to bail the whole application out on that case. Let's check in kick_tx()
whether errno was set to mentioned value and basically allow application
to further process frames.

Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access")
Reported-by: Cameron Elliott &lt;cameron@cameronelliott.com&gt;
Signed-off-by: Maciej Fijalkowski &lt;maciej.fijalkowski@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20200205045834.56795-4-maciej.fijalkowski@intel.com
</content>
</entry>
<entry>
<title>samples: bpf: Drop doubled variable declaration in xdpsock</title>
<updated>2020-02-05T21:06:09Z</updated>
<author>
<name>Maciej Fijalkowski</name>
</author>
<published>2020-02-05T04:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32c92c15ad3dca6f7cca8643766ad79fa3ab3d17'/>
<id>urn:sha1:32c92c15ad3dca6f7cca8643766ad79fa3ab3d17</id>
<content type='text'>
Seems that by accident there is a doubled declaration of global variable
opt_xdp_bind_flags in xdpsock_user.c. The second one is uninitialized so
compiler was simply ignoring it.

To keep things clean, drop the doubled variable.

Fixes: c543f5469822 ("samples/bpf: add unaligned chunks mode support to xdpsock")
Signed-off-by: Maciej Fijalkowski &lt;maciej.fijalkowski@intel.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Björn Töpel &lt;bjorn.topel@intel.com&gt;
Link: https://lore.kernel.org/bpf/20200205045834.56795-3-maciej.fijalkowski@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: Use consistent include paths for libbpf</title>
<updated>2020-01-21T00:37:45Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
</author>
<published>2020-01-20T13:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7cf245a37ef013b2c1c5ca7ae25061de2ba7ad01'/>
<id>urn:sha1:7cf245a37ef013b2c1c5ca7ae25061de2ba7ad01</id>
<content type='text'>
Fix all files in samples/bpf to include libbpf header files with the bpf/
prefix, to be consistent with external users of the library. Also ensure
that all includes of exported libbpf header files (those that are exported
on 'make install' of the library) use bracketed includes instead of quoted.

To make sure no new files are introduced that doesn't include the bpf/
prefix in its include, remove tools/lib/bpf from the include path entirely,
and use tools/lib instead.

Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir")
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: Andrii Nakryiko &lt;andriin@fb.com&gt;
Link: https://lore.kernel.org/bpf/157952560911.1683545.8795966751309534150.stgit@toke.dk
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Add option to specify transmit fill pattern</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46e3268eaaca9f8a0f145872b96fe6d54a232890'/>
<id>urn:sha1:46e3268eaaca9f8a0f145872b96fe6d54a232890</id>
<content type='text'>
The UDP payload fill pattern can be specified using '-P' or '--tx-pkt-pattern'
option. It is an unsigned 32 bit field and defaulted to 0x12345678.

The IP and UDP checksum is calculated by the code as per the content of
the packet before transmission.

Signed-off-by: Jay Jayatheerthan &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-7-jay.jayatheerthan@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Add option to specify tx packet size</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a3c23ae3acc6185a9d418830f22672a52ff986a'/>
<id>urn:sha1:4a3c23ae3acc6185a9d418830f22672a52ff986a</id>
<content type='text'>
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 &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-6-jay.jayatheerthan@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Add option to specify number of packets to send</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ece6e9694751a4f0b99372724a0705a0217132b3'/>
<id>urn:sha1:ece6e9694751a4f0b99372724a0705a0217132b3</id>
<content type='text'>
Use '-C' or '--tx-pkt-count' to specify number of packets to send.
If it is not specified, the application sends packets forever. If packet
count is not a multiple of batch size, last batch sent is less than the
batch size.

Signed-off-by: Jay Jayatheerthan &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-5-jay.jayatheerthan@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Add option to specify batch size</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd9e72b6f21044b36a096833003811c2b2038455'/>
<id>urn:sha1:cd9e72b6f21044b36a096833003811c2b2038455</id>
<content type='text'>
New option to specify batch size for tx, rx and l2fwd has been added. This
allows fine tuning to maximize performance. It is specified using '-b' or
'--batch_size' options. When not specified default is 64.

Signed-off-by: Jay Jayatheerthan &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-4-jay.jayatheerthan@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Use common code to handle signal and main exit</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=695255882bdf63da240db33d0f2aa9ccca1cbe67'/>
<id>urn:sha1:695255882bdf63da240db33d0f2aa9ccca1cbe67</id>
<content type='text'>
Add code to do cleanup for signals and application completion in a unified
fashion. The signal handler sets benckmark_done flag terminating the
threads. The cleanup is called before returning from main() function.

Signed-off-by: Jay Jayatheerthan &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-3-jay.jayatheerthan@intel.com
</content>
</entry>
<entry>
<title>samples/bpf: xdpsock: Add duration option to specify how long to run</title>
<updated>2019-12-21T00:10:39Z</updated>
<author>
<name>Jay Jayatheerthan</name>
</author>
<published>2019-12-20T08:55:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3f11b018f6ce278e683008e9c225fe87afc532d'/>
<id>urn:sha1:d3f11b018f6ce278e683008e9c225fe87afc532d</id>
<content type='text'>
The application now supports '-d' or '--duration' option to specify number of
seconds to run. This is used in tx, rx and l2fwd features. If this option is
not provided, the application runs forever.

Signed-off-by: Jay Jayatheerthan &lt;jay.jayatheerthan@intel.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20191220085530.4980-2-jay.jayatheerthan@intel.com
</content>
</entry>
</feed>
