Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10 |
|
#
354627f9 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ Upstream commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb ]
When an XDP program is loaded the existing channels in the driver split int
net: ena: Use tx_ring instead of xdp_ring for XDP channel TX
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
bc0ad685 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ Upstream commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 ]
This change will enable the ability to use ena_xmit_common() in fu
net: ena: Pass ena_adapter instead of net_device to ena_xmit_common()
[ 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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
c891d767 |
| 01-Jan-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Move XDP code to its new files
[ Upstream commit d000574d02870710c62751148cbfe22993222b98 ]
XDP system has a very large footprint in the driver's overall code. makes the whole driver's co
net: ena: Move XDP code to its new files
[ 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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 36a1ca01f045 ("net: ena: Set tx_info->xdpf value to NULL") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
Revision tags: v6.6.30, v6.6.29, v6.6.28, v6.6.27, v6.6.26 |
|
#
2fc4d53f |
| 10-Apr-2024 |
David Arinzon <darinzon@amazon.com> |
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NUL
net: ena: Set tx_info->xdpf value to NULL
[ Upstream commit 36a1ca01f0452f2549420e7279c2588729bd94df ]
The patch mentioned in the `Fixes` tag removed the explicit assignment of tx_info->xdpf to NULL with the justification that there's no need to set tx_info->xdpf to NULL and tx_info->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->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->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->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->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 <shayagr@amazon.com> Signed-off-by: David Arinzon <darinzon@amazon.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|