Skip to content

Commit ca50cbd

Browse files
vlrplnbuchwitz
authored andcommitted
net: macb: add XDP support for gem
Introduce basic XDP support for macb/gem with the XDP_TX, XDP_PASS, XDP_DROP, XDP_REDIRECT verdict support. Signed-off-by: Paolo Valerio <pvalerio@redhat.com>
1 parent edb72cf commit ca50cbd

File tree

2 files changed

+338
-37
lines changed

2 files changed

+338
-37
lines changed

drivers/net/ethernet/cadence/macb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/phy/phy.h>
1616
#include <linux/workqueue.h>
1717
#include <net/page_pool/helpers.h>
18+
#include <net/xdp.h>
1819

1920
#if defined(CONFIG_ARCH_DMA_ADDR_T_64BIT) || defined(CONFIG_MACB_USE_HWSTAMP)
2021
#define MACB_EXT_DESC
@@ -1317,6 +1318,7 @@ struct macb_queue {
13171318
struct queue_stats stats;
13181319
struct page_pool *page_pool;
13191320
struct sk_buff *skb;
1321+
struct xdp_rxq_info xdp_rxq;
13201322
};
13211323

13221324
struct ethtool_rx_fs_item {
@@ -1432,6 +1434,7 @@ struct macb {
14321434

14331435
struct macb_pm_data pm_data;
14341436
const struct macb_usrio_config *usrio;
1437+
struct bpf_prog __rcu *prog;
14351438
};
14361439

14371440
#ifdef CONFIG_MACB_USE_HWSTAMP

0 commit comments

Comments
 (0)