Skip to content

Commit

Permalink
net: ena: Move XDP code to its new files
Browse files Browse the repository at this point in the history
[ Upstream commit d000574 ]

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: 36a1ca0 ("net: ena: Set tx_info->xdpf value to NULL")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
davidarinzon authored and gregkh committed Apr 17, 2024
1 parent 5c7f224 commit c891d76
Show file tree
Hide file tree
Showing 7 changed files with 680 additions and 657 deletions.
Expand Up @@ -54,6 +54,7 @@ ena_common_defs.h Common definitions for ena_com layer.
ena_regs_defs.h Definition of ENA PCI memory-mapped (MMIO) registers.
ena_netdev.[ch] Main Linux kernel driver.
ena_ethtool.c ethtool callbacks.
ena_xdp.[ch] XDP files
ena_pci_id_tbl.h Supported device IDs.
================= ======================================================

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/amazon/ena/Makefile
Expand Up @@ -5,4 +5,4 @@

obj-$(CONFIG_ENA_ETHERNET) += ena.o

ena-y := ena_netdev.o ena_com.o ena_eth_com.o ena_ethtool.o
ena-y := ena_netdev.o ena_com.o ena_eth_com.o ena_ethtool.o ena_xdp.o
1 change: 1 addition & 0 deletions drivers/net/ethernet/amazon/ena/ena_ethtool.c
Expand Up @@ -7,6 +7,7 @@
#include <linux/pci.h>

#include "ena_netdev.h"
#include "ena_xdp.h"

struct ena_stats {
char name[ETH_GSTRING_LEN];
Expand Down

0 comments on commit c891d76

Please sign in to comment.