<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/ethernet/amazon, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-29T13:07:01+00:00</updated>
<entry>
<title>net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush().</title>
<updated>2025-10-29T13:07:01+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2023-09-08T14:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=74c94df40ede992e982151b9e62595a1ec3423ea'/>
<id>urn:sha1:74c94df40ede992e982151b9e62595a1ec3423ea</id>
<content type='text'>
[ Upstream commit 7f04bd109d4c358a12b125bc79a6f0eac2e915ec ]

xdp_do_flush_map() is deprecated and new code should use xdp_do_flush()
instead.

Replace xdp_do_flush_map() with xdp_do_flush().

Cc: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: Clark Wang &lt;xiaoning.wang@nxp.com&gt;
Cc: Claudiu Manoil &lt;claudiu.manoil@nxp.com&gt;
Cc: David Arinzon &lt;darinzon@amazon.com&gt;
Cc: Edward Cree &lt;ecree.xilinx@gmail.com&gt;
Cc: Felix Fietkau &lt;nbd@nbd.name&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Jassi Brar &lt;jaswinder.singh@linaro.org&gt;
Cc: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Cc: John Crispin &lt;john@phrozen.org&gt;
Cc: Leon Romanovsky &lt;leon@kernel.org&gt;
Cc: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Cc: Louis Peens &lt;louis.peens@corigine.com&gt;
Cc: Marcin Wojtas &lt;mw@semihalf.com&gt;
Cc: Mark Lee &lt;Mark-MC.Lee@mediatek.com&gt;
Cc: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: Noam Dagan &lt;ndagan@amazon.com&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Cc: Saeed Bishara &lt;saeedb@amazon.com&gt;
Cc: Saeed Mahameed &lt;saeedm@nvidia.com&gt;
Cc: Sean Wang &lt;sean.wang@mediatek.com&gt;
Cc: Shay Agroskin &lt;shayagr@amazon.com&gt;
Cc: Shenwei Wang &lt;shenwei.wang@nxp.com&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Cc: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Cc: Vladimir Oltean &lt;vladimir.oltean@nxp.com&gt;
Cc: Wei Fang &lt;wei.fang@nxp.com&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Acked-by: Arthur Kiyanovski &lt;akiyano@amazon.com&gt;
Acked-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Acked-by: Martin Habets &lt;habetsm.xilinx@gmail.com&gt;
Acked-by: Jesper Dangaard Brouer &lt;hawk@kernel.org&gt;
Link: https://lore.kernel.org/r/20230908143215.869913-2-bigeasy@linutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Stable-dep-of: 50bd33f6b392 ("net: enetc: fix the deadlock of enetc_mdio_lock")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: return 0 in ena_get_rxfh_key_size() when RSS hash key is not configurable</title>
<updated>2025-10-15T09:58:06+00:00</updated>
<author>
<name>Kohei Enju</name>
<email>enjuk@amazon.com</email>
</author>
<published>2025-09-29T05:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e627ae572b2ac3b02dbfa19e1428753cacd065a'/>
<id>urn:sha1:5e627ae572b2ac3b02dbfa19e1428753cacd065a</id>
<content type='text'>
[ Upstream commit f017156aea60db8720e47591ed1e041993381ad2 ]

In EC2 instances where the RSS hash key is not configurable, ethtool
shows bogus RSS hash key since ena_get_rxfh_key_size() unconditionally
returns ENA_HASH_KEY_SIZE.

Commit 6a4f7dc82d1e ("net: ena: rss: do not allocate key when not
supported") added proper handling for devices that don't support RSS
hash key configuration, but ena_get_rxfh_key_size() has been unchanged.

When the RSS hash key is not configurable, return 0 instead of
ENA_HASH_KEY_SIZE to clarify getting the value is not supported.

Tested on m5 instance families.

Without patch:
 # ethtool -x ens5 | grep -A 1 "RSS hash key"
 RSS hash key:
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

With patch:
 # ethtool -x ens5 | grep -A 1 "RSS hash key"
 RSS hash key:
 Operation not supported

Fixes: 6a4f7dc82d1e ("net: ena: rss: do not allocate key when not supported")
Signed-off-by: Kohei Enju &lt;enjuk@amazon.com&gt;
Link: https://patch.msgid.link/20250929050247.51680-1-enjuk@amazon.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Fix redundant device NUMA node override</title>
<updated>2024-06-12T09:12:59+00:00</updated>
<author>
<name>Shay Agroskin</name>
<email>shayagr@amazon.com</email>
</author>
<published>2024-05-28T17:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=659ef6fd4934b01578f21c99431c67ae11558bc9'/>
<id>urn:sha1:659ef6fd4934b01578f21c99431c67ae11558bc9</id>
<content type='text'>
[ Upstream commit 2dc8b1e7177d4f49f492ce648440caf2de0c3616 ]

The driver overrides the NUMA node id of the device regardless of
whether it knows its correct value (often setting it to -1 even though
the node id is advertised in 'struct device'). This can lead to
suboptimal configurations.

This patch fixes this behavior and makes the shared memory allocation
functions use the NUMA node id advertised by the underlying device.

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Link: https://lore.kernel.org/r/20240528170912.1204417-1-shayagr@amazon.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Reduce lines with longer column width boundary</title>
<updated>2024-06-12T09:12:59+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-01-30T09:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26668c2d449de588f7f7324142f91bcacdcf9ad1'/>
<id>urn:sha1:26668c2d449de588f7f7324142f91bcacdcf9ad1</id>
<content type='text'>
[ Upstream commit 50613650c3d6255cef13a129ccaa919ca73a6743 ]

This patch reduces some of the lines by removing newlines
where more variables or print strings can be pushed back
to the previous line while still adhering to the styling
guidelines.

Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Stable-dep-of: 2dc8b1e7177d ("net: ena: Fix redundant device NUMA node override")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Set tx_info-&gt;xdpf value to NULL</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-04-10T09:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2fc4d53ff055d6e18c986c3231d8a7cf1b00ff82'/>
<id>urn:sha1:2fc4d53ff055d6e18c986c3231d8a7cf1b00ff82</id>
<content type='text'>
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]

The patch mentioned in the `Fixes` tag removed the explicit assignment
of tx_info-&gt;xdpf to NULL with the justification that there's no need
to set tx_info-&gt;xdpf to NULL and tx_info-&gt;num_of_bufs to 0 in case
of a mapping error. Both values won't be used once the mapping function
returns an error, and their values would be overridden by the next
transmitted packet.

While both values do indeed get overridden in the next transmission
call, the value of tx_info-&gt;xdpf is also used to check whether a TX
descriptor's transmission has been completed (i.e. a completion for it
was polled).

An example scenario:
1. Mapping failed, tx_info-&gt;xdpf wasn't set to NULL
2. A VF reset occurred leading to IO resource destruction and
   a call to ena_free_tx_bufs() function
3. Although the descriptor whose mapping failed was freed by the
   transmission function, it still passes the check
     if (!tx_info-&gt;skb)

   (skb and xdp_frame are in a union)
4. The xdp_frame associated with the descriptor is freed twice

This patch returns the assignment of NULL to tx_info-&gt;xdpf to make the
cleaning function knows that the descriptor is already freed.

Fixes: 504fd6a5390c ("net: ena: fix DMA mapping function issues in XDP")
Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Reviewed-by: Shannon Nelson &lt;shannon.nelson@amd.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Use tx_ring instead of xdp_ring for XDP channel TX</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-01-01T19:08:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=354627f9267949cdb8049d0ff0b539207ef21836'/>
<id>urn:sha1:354627f9267949cdb8049d0ff0b539207ef21836</id>
<content type='text'>
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]

When an XDP program is loaded the existing channels in the driver split
into two halves:
- The first half of the channels contain RX and TX rings, these queues
  are used for receiving traffic and sending packets originating from
  kernel.
- The second half of the channels contain only a TX ring. These queues
  are used for sending packets that were redirected using XDP_TX
  or XDP_REDIRECT.

Referring to the queues in the second half of the channels as "xdp_ring"
can be confusing and may give the impression that ENA has the capability
to generate an additional special queue.

This patch ensures that the xdp_ring field is exclusively used to
describe the XDP TX queue that a specific RX queue needs to utilize when
forwarding packets with XDP TX and XDP REDIRECT, preserving the
integrity of the xdp_ring field in ena_ring.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info-&gt;xdpf value to NULL")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-01-01T19:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc0ad6857c868401b60096a892c28c045c3f21ab'/>
<id>urn:sha1:bc0ad6857c868401b60096a892c28c045c3f21ab</id>
<content type='text'>
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]

This change will enable the ability to use ena_xmit_common()
in functions that don't have a net_device pointer.
While it can be retrieved by dereferencing
ena_adapter (adapter-&gt;netdev), there's no reason to do it in
fast path code where this pointer is only needed for
debug prints.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info-&gt;xdpf value to NULL")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Move XDP code to its new files</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-01-01T19:08:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c891d7678f4446baa64b8206757419fefe536c3d'/>
<id>urn:sha1:c891d7678f4446baa64b8206757419fefe536c3d</id>
<content type='text'>
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]

XDP system has a very large footprint in the driver's overall code.
makes the whole driver's code much harder to read.

Moving XDP code to dedicated files.

This patch doesn't make any changes to the code itself and only
cut-pastes the code into ena_xdp.c and ena_xdp.h files so the change
is purely cosmetic.

Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info-&gt;xdpf value to NULL")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Fix incorrect descriptor free behavior</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-04-10T09:13:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c7f2240d9835a7823d87f7460d8eae9f4e504c7'/>
<id>urn:sha1:5c7f2240d9835a7823d87f7460d8eae9f4e504c7</id>
<content type='text'>
[ Upstream commit bf02d9fe00632d22fa91d34749c7aacf397b6cde ]

ENA has two types of TX queues:
- queues which only process TX packets arriving from the network stack
- queues which only process TX packets forwarded to it by XDP_REDIRECT
  or XDP_TX instructions

The ena_free_tx_bufs() cycles through all descriptors in a TX queue
and unmaps + frees every descriptor that hasn't been acknowledged yet
by the device (uncompleted TX transactions).
The function assumes that the processed TX queue is necessarily from
the first category listed above and ends up using napi_consume_skb()
for descriptors belonging to an XDP specific queue.

This patch solves a bug in which, in case of a VF reset, the
descriptors aren't freed correctly, leading to crashes.

Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action")
Signed-off-by: Shay Agroskin &lt;shayagr@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Reviewed-by: Shannon Nelson &lt;shannon.nelson@amd.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ena: Wrong missing IO completions check order</title>
<updated>2024-04-17T09:19:32+00:00</updated>
<author>
<name>David Arinzon</name>
<email>darinzon@amazon.com</email>
</author>
<published>2024-04-10T09:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc1d1e35c8fda76dd96208cb9050737dd4aa3259'/>
<id>urn:sha1:dc1d1e35c8fda76dd96208cb9050737dd4aa3259</id>
<content type='text'>
[ Upstream commit f7e417180665234fdb7af2ebe33d89aaa434d16f ]

Missing IO completions check is called every second (HZ jiffies).
This commit fixes several issues with this check:

1. Duplicate queues check:
   Max of 4 queues are scanned on each check due to monitor budget.
   Once reaching the budget, this check exits under the assumption that
   the next check will continue to scan the remainder of the queues,
   but in practice, next check will first scan the last already scanned
   queue which is not necessary and may cause the full queue scan to
   last a couple of seconds longer.
   The fix is to start every check with the next queue to scan.
   For example, on 8 IO queues:
   Bug: [0,1,2,3], [3,4,5,6], [6,7]
   Fix: [0,1,2,3], [4,5,6,7]

2. Unbalanced queues check:
   In case the number of active IO queues is not a multiple of budget,
   there will be checks which don't utilize the full budget
   because the full scan exits when reaching the last queue id.
   The fix is to run every TX completion check with exact queue budget
   regardless of the queue id.
   For example, on 7 IO queues:
   Bug: [0,1,2,3], [4,5,6], [0,1,2,3]
   Fix: [0,1,2,3], [4,5,6,0], [1,2,3,4]
   The budget may be lowered in case the number of IO queues is less
   than the budget (4) to make sure there are no duplicate queues on
   the same check.
   For example, on 3 IO queues:
   Bug: [0,1,2,0], [1,2,0,1]
   Fix: [0,1,2], [0,1,2]

Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Amit Bernstein &lt;amitbern@amazon.com&gt;
Signed-off-by: David Arinzon &lt;darinzon@amazon.com&gt;
Reviewed-by: Shannon Nelson &lt;shannon.nelson@amd.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
