<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/net/xdp.h, branch v5.17.9</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.17.9</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.17.9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-01-06T03:46:32+00:00</updated>
<entry>
<title>xdp: Allow registering memory model without rxq reference</title>
<updated>2022-01-06T03:46:32+00:00</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
<email>toke@redhat.com</email>
</author>
<published>2022-01-03T15:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a48ef70b93b8c7ed5190adfca18849e76387b80'/>
<id>urn:sha1:4a48ef70b93b8c7ed5190adfca18849e76387b80</id>
<content type='text'>
The functions that register an XDP memory model take a struct xdp_rxq as
parameter, but the RXQ is not actually used for anything other than pulling
out the struct xdp_mem_info that it embeds. So refactor the register
functions and export variants that just take a pointer to the xdp_mem_info.

This is in preparation for enabling XDP_REDIRECT in bpf_prog_run(), using a
page_pool instance that is not connected to any network device.

Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220103150812.87914-2-toke@redhat.com
</content>
</entry>
<entry>
<title>bpf, xdp, docs: Correct some English grammar and spelling</title>
<updated>2021-09-30T21:23:49+00:00</updated>
<author>
<name>Kev Jackson</name>
<email>foamdino@gmail.com</email>
</author>
<published>2021-09-30T06:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bbc7103738f0e0871a9331351ee3cd4d462b431'/>
<id>urn:sha1:6bbc7103738f0e0871a9331351ee3cd4d462b431</id>
<content type='text'>
Header DOC on include/net/xdp.h contained a few English grammer and
spelling errors.

Signed-off-by: Kev Jackson &lt;foamdino@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lore.kernel.org/bpf/YVVaWmKqA8l9Tm4J@kev-VirtualBox
</content>
</entry>
<entry>
<title>bpf: Add function for XDP meta data length check</title>
<updated>2021-07-08T02:51:12+00:00</updated>
<author>
<name>Zvi Effron</name>
<email>zeffron@riotgames.com</email>
</author>
<published>2021-07-07T22:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7445cf31d2e25e3f8ad7b1c5342e624c09ab23a2'/>
<id>urn:sha1:7445cf31d2e25e3f8ad7b1c5342e624c09ab23a2</id>
<content type='text'>
This commit prepares to use the XDP meta data length check in multiple
places by making it into a static inline function instead of a literal.

Co-developed-by: Cody Haas &lt;chaas@riotgames.com&gt;
Co-developed-by: Lisa Watanabe &lt;lwatanabe@riotgames.com&gt;
Signed-off-by: Cody Haas &lt;chaas@riotgames.com&gt;
Signed-off-by: Lisa Watanabe &lt;lwatanabe@riotgames.com&gt;
Signed-off-by: Zvi Effron &lt;zeffron@riotgames.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20210707221657.3985075-2-zeffron@riotgames.com
</content>
</entry>
<entry>
<title>xdp: Extend xdp_redirect_map with broadcast support</title>
<updated>2021-05-26T07:46:16+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2021-05-19T09:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e624d4ed4aa8cc3c69d1359b0aaea539203ed266'/>
<id>urn:sha1:e624d4ed4aa8cc3c69d1359b0aaea539203ed266</id>
<content type='text'>
This patch adds two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to
extend xdp_redirect_map for broadcast support.

With BPF_F_BROADCAST the packet will be broadcasted to all the interfaces
in the map. with BPF_F_EXCLUDE_INGRESS the ingress interface will be
excluded when do broadcasting.

When getting the devices in dev hash map via dev_map_hash_get_next_key(),
there is a possibility that we fall back to the first key when a device
was removed. This will duplicate packets on some interfaces. So just walk
the whole buckets to avoid this issue. For dev array map, we also walk the
whole map to find valid interfaces.

Function bpf_clear_redirect_map() was removed in
commit ee75aef23afe ("bpf, xdp: Restructure redirect actions").
Add it back as we need to use ri-&gt;map again.

With test topology:
  +-------------------+             +-------------------+
  | Host A (i40e 10G) |  ---------- | eno1(i40e 10G)    |
  +-------------------+             |                   |
                                    |   Host B          |
  +-------------------+             |                   |
  | Host C (i40e 10G) |  ---------- | eno2(i40e 10G)    |
  +-------------------+             |                   |
                                    |          +------+ |
                                    | veth0 -- | Peer | |
                                    | veth1 -- |      | |
                                    | veth2 -- |  NS  | |
                                    |          +------+ |
                                    +-------------------+

On Host A:
 # pktgen/pktgen_sample03_burst_single_flow.sh -i eno1 -d $dst_ip -m $dst_mac -s 64

On Host B(Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz, 128G Memory):
Use xdp_redirect_map and xdp_redirect_map_multi in samples/bpf for testing.
All the veth peers in the NS have a XDP_DROP program loaded. The
forward_map max_entries in xdp_redirect_map_multi is modify to 4.

Testing the performance impact on the regular xdp_redirect path with and
without patch (to check impact of additional check for broadcast mode):

5.12 rc4         | redirect_map        i40e-&gt;i40e      |    2.0M |  9.7M
5.12 rc4         | redirect_map        i40e-&gt;veth      |    1.7M | 11.8M
5.12 rc4 + patch | redirect_map        i40e-&gt;i40e      |    2.0M |  9.6M
5.12 rc4 + patch | redirect_map        i40e-&gt;veth      |    1.7M | 11.7M

Testing the performance when cloning packets with the redirect_map_multi
test, using a redirect map size of 4, filled with 1-3 devices:

5.12 rc4 + patch | redirect_map multi  i40e-&gt;veth (x1) |    1.7M | 11.4M
5.12 rc4 + patch | redirect_map multi  i40e-&gt;veth (x2) |    1.1M |  4.3M
5.12 rc4 + patch | redirect_map multi  i40e-&gt;veth (x3) |    0.8M |  2.6M

Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lore.kernel.org/bpf/20210519090747.1655268-3-liuhangbin@gmail.com
</content>
</entry>
<entry>
<title>net, veth: Alloc skb in bulk for ndo_xdp_xmit</title>
<updated>2021-02-04T00:00:07+00:00</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-01-29T22:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=65e6dcf73398ddb64bb782ff2acd918d3a37a53a'/>
<id>urn:sha1:65e6dcf73398ddb64bb782ff2acd918d3a37a53a</id>
<content type='text'>
Split ndo_xdp_xmit and ndo_start_xmit use cases in veth_xdp_rcv routine
in order to alloc skbs in bulk for XDP_PASS verdict.

Introduce xdp_alloc_skb_bulk utility routine to alloc skb bulk list.
The proposed approach has been tested in the following scenario:

eth (ixgbe) --&gt; XDP_REDIRECT --&gt; veth0 --&gt; (remote-ns) veth1 --&gt; XDP_PASS

XDP_REDIRECT: xdp_redirect_map bpf sample
XDP_PASS: xdp_rxq_info bpf sample

traffic generator: pkt_gen sending udp traffic on a remote device

bpf-next master: ~3.64Mpps
bpf-next + skb bulking allocation: ~3.79Mpps

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Toshiaki Makita &lt;toshiaki.makita1@gmail.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lore.kernel.org/bpf/a14a30d3c06fff24e13f836c733d80efc0bd6eb5.1611957532.git.lorenzo@kernel.org
</content>
</entry>
<entry>
<title>net, xdp: Introduce xdp_build_skb_from_frame utility routine</title>
<updated>2021-01-20T22:10:35+00:00</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-01-12T18:26:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89f479f0eccfc879e7bc0a69f44ed4a4639dfc32'/>
<id>urn:sha1:89f479f0eccfc879e7bc0a69f44ed4a4639dfc32</id>
<content type='text'>
Introduce xdp_build_skb_from_frame utility routine to build the skb
from xdp_frame. Respect to __xdp_build_skb_from_frame,
xdp_build_skb_from_frame will allocate the skb object. Rely on
xdp_build_skb_from_frame in veth driver.
Introduce missing xdp metadata support in veth_xdp_rcv_one routine.
Add missing metadata support in veth_xdp_rcv_one().

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Toshiaki Makita &lt;toshiaki.makita1@gmail.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lore.kernel.org/bpf/94ade9e853162ae1947941965193190da97457bc.1610475660.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>net, xdp: Introduce __xdp_build_skb_from_frame utility routine</title>
<updated>2021-01-20T22:10:35+00:00</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-01-12T18:26:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97a0e1ea7b41c2db762c1258632f6ccc22719510'/>
<id>urn:sha1:97a0e1ea7b41c2db762c1258632f6ccc22719510</id>
<content type='text'>
Introduce __xdp_build_skb_from_frame utility routine to build
the skb from xdp_frame. Rely on __xdp_build_skb_from_frame in
cpumap code.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Link: https://lore.kernel.org/bpf/4f9f4c6b3dd3933770c617eb6689dbc0c6e25863.1610475660.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>net, xdp: Introduce xdp_prepare_buff utility routine</title>
<updated>2021-01-08T21:39:24+00:00</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2020-12-22T21:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be9df4aff65f18caa79b35f88f42c3d5a43af14f'/>
<id>urn:sha1:be9df4aff65f18caa79b35f88f42c3d5a43af14f</id>
<content type='text'>
Introduce xdp_prepare_buff utility routine to initialize per-descriptor
xdp_buff fields (e.g. xdp_buff pointers). Rely on xdp_prepare_buff() in
all XDP capable drivers.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Alexander Duyck &lt;alexanderduyck@fb.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Acked-by: Martin Habets &lt;habetsm.xilinx@gmail.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Acked-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Link: https://lore.kernel.org/bpf/45f46f12295972a97da8ca01990b3e71501e9d89.1608670965.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>net, xdp: Introduce xdp_init_buff utility routine</title>
<updated>2021-01-08T21:39:24+00:00</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2020-12-22T21:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=43b5169d8355ccf26d726fbc75f083b2429113e4'/>
<id>urn:sha1:43b5169d8355ccf26d726fbc75f083b2429113e4</id>
<content type='text'>
Introduce xdp_init_buff utility routine to initialize xdp_buff fields
const over NAPI iterations (e.g. frame_sz or rxq pointer). Rely on
xdp_init_buff in all XDP capable drivers.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Alexander Duyck &lt;alexanderduyck@fb.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;brouer@redhat.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Acked-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Acked-by: Martin Habets &lt;habetsm.xilinx@gmail.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Acked-by: Marcin Wojtas &lt;mw@semihalf.com&gt;
Link: https://lore.kernel.org/bpf/7f8329b6da1434dc2b05a77f2e800b29628a8913.1608670965.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2020-12-12T06:29:38+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-12-12T04:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46d5e62dd3c34770f3bfd0642daa9a7772a00362'/>
<id>urn:sha1:46d5e62dd3c34770f3bfd0642daa9a7772a00362</id>
<content type='text'>
xdp_return_frame_bulk() needs to pass a xdp_buff
to __xdp_return().

strlcpy got converted to strscpy but here it makes no
functional difference, so just keep the right code.

Conflicts:
	net/netfilter/nf_tables_api.c

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
