<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/amazon, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-06-23T12:43:55Z</updated>
<entry>
<title>net: ena: fix DMA mapping function issues in XDP</title>
<updated>2021-06-23T12:43:55Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2021-06-08T16:42:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b66c0119c87c8dce75e2ac8dd9c518309619e6d'/>
<id>urn:sha1:2b66c0119c87c8dce75e2ac8dd9c518309619e6d</id>
<content type='text'>
[ Upstream commit 504fd6a5390c30b1b7670768e314dd5d473da06a ]

This patch fixes several bugs found when (DMA/LLQ) mapping a packet for
transmission. The mapping procedure makes the transmitted packet
accessible by the device.
When using LLQ, this requires copying the packet's header to push header
(which would be passed to LLQ) and creating DMA mapping for the payload
(if the packet doesn't fit the maximum push length).
When not using LLQ, we map the whole packet with DMA.

The following bugs are fixed in the code:
    1. Add support for non-LLQ machines:
       The ena_xdp_tx_map_frame() function assumed that LLQ is
       supported, and never mapped the whole packet using DMA. On some
       instances, which don't support LLQ, this causes loss of traffic.

    2. Wrong DMA buffer length passed to device:
       When using LLQ, the first 'tx_max_header_size' bytes of the
       packet would be copied to push header. The rest of the packet
       would be copied to a DMA'd buffer.

    3. Freeing the XDP buffer twice in case of a mapping error:
       In case a buffer DMA mapping fails, the function uses
       xdp_return_frame_rx_napi() to free the RX buffer and returns from
       the function with an error. XDP frames that fail to xmit get
       freed by the kernel and so there is no need for this call.

Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-02-10T21:30:12Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2021-02-10T21:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc9d87581d464e7b7d38853d6904b70b6c920d99'/>
<id>urn:sha1:dc9d87581d464e7b7d38853d6904b70b6c920d99</id>
<content type='text'>
</content>
</entry>
<entry>
<title>net: ena: Update XDP verdict upon failure</title>
<updated>2021-02-06T23:07:29Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2021-02-05T19:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=225353c070fda18a23785e34e1eec2be508a3a3c'/>
<id>urn:sha1:225353c070fda18a23785e34e1eec2be508a3a3c</id>
<content type='text'>
The verdict returned from ena_xdp_execute() is used to determine the
fate of the RX buffer's page. In case of XDP Redirect/TX error the
verdict should be set to XDP_ABORTED, otherwise the page won't be freed.

Fixes: a318c70ad152 ("net: ena: introduce XDP redirect implementation")
Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net, xdp: Introduce xdp_prepare_buff utility routine</title>
<updated>2021-01-08T21:39:24Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2020-12-22T21:09:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:24Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2020-12-22T21:09:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>net: ena: introduce ndo_xdp_xmit() function for XDP_REDIRECT</title>
<updated>2020-12-09T23:26:40Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2020-12-08T18:02:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1a25589130366a96a2a0d165e9f4d9289336e9f'/>
<id>urn:sha1:f1a25589130366a96a2a0d165e9f4d9289336e9f</id>
<content type='text'>
This patch implements the ndo_xdp_xmit() net_device function which is
called when a packet is redirected to this driver using an
XDP_REDIRECT directive.

The function receives an array of xdp frames that it needs to xmit.
The TX queues that are used to xmit these frames are the XDP
queues used by the XDP_TX flow. Therefore a lock is added to synchronize
both flows (XDP_TX and XDP_REDIRECT).

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: use xdp_return_frame() to free xdp frames</title>
<updated>2020-12-09T23:26:40Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2020-12-08T18:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8b91f255a05c4734ab093eb93b5826499a35328'/>
<id>urn:sha1:f8b91f255a05c4734ab093eb93b5826499a35328</id>
<content type='text'>
XDP subsystem has a function to free XDP frames and their associated
pages. Using this function would help the driver's XDP implementation to
adjust to new changes in the XDP subsystem in the kernel (e.g.
introduction of XDP MB).

Also, remove 'xdp_rx_page' field from ena_tx_buffer struct since it is
no longer used.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: introduce XDP redirect implementation</title>
<updated>2020-12-09T23:26:40Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2020-12-08T18:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a318c70ad152b24f92870dfe5d93b7675498c68f'/>
<id>urn:sha1:a318c70ad152b24f92870dfe5d93b7675498c68f</id>
<content type='text'>
This patch adds a partial support for the XDP_REDIRECT directive which
instructs the driver to pass the packet to an interface specified by the
program. The directive is passed to the driver by calling bpf_redirect()
or bpf_redirect_map() functions from the eBPF program.

To lay the ground for integration with the existing XDP TX
implementation the patch removes the redundant page ref count increase
in ena_xdp_xmit_frame() and then decrease in ena_clean_rx_irq(). Instead
it only DMA unmaps descriptors for which XDP TX or REDIRECT directive
was received.

The XDP Redirect support is still missing .ndo_xdp_xmit function
implementation, which allows to redirect packet to an ENA interface,
which would be added in a later patch.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: use xdp_frame in XDP TX flow</title>
<updated>2020-12-09T23:26:40Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2020-12-08T18:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8223eeff021bc0f348efa10781119d23a68cf04'/>
<id>urn:sha1:e8223eeff021bc0f348efa10781119d23a68cf04</id>
<content type='text'>
Rename the ena_xdp_xmit_buff() function to ena_xdp_xmit_frame() and pass
it an xdp_frame struct instead of xdp_buff.
This change lays the ground for XDP redirect implementation which uses
xdp_frames when 'xmit'ing packets.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: aggregate stats increase into a function</title>
<updated>2020-12-09T23:26:40Z</updated>
<author>
<name>Shay Agroskin</name>
</author>
<published>2020-12-08T18:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89dd735e8c1e58b9b0d39535c7c32261773cb495'/>
<id>urn:sha1:89dd735e8c1e58b9b0d39535c7c32261773cb495</id>
<content type='text'>
Introduce ena_increase_stat() function to increase statistics by a
certain number.
The function includes the
    - lock aquire (on 32bit machines)
    - stat increase
    - lock release (on 32bit machines)

line sequence that is ubiquitous across the driver.

The function increases a single stat at a time and several stats which
are increased together weren't put into a function to avoid
calling the function several times for each stat which looks bad and
might decrease performance.

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