linux/drivers/net/vmxnet3/vmxnet3_xdp.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Linux driver for VMware's vmxnet3 ethernet NIC.
 * Copyright (C) 2008-2023, VMware, Inc. All Rights Reserved.
 * Maintained by: [email protected]
 *
 */

#include "vmxnet3_int.h"
#include "vmxnet3_xdp.h"

static void
vmxnet3_xdp_exchange_program(struct vmxnet3_adapter *adapter,
			     struct bpf_prog *prog)
{}

static inline struct vmxnet3_tx_queue *
vmxnet3_xdp_get_tq(struct vmxnet3_adapter *adapter)
{}

static int
vmxnet3_xdp_set(struct net_device *netdev, struct netdev_bpf *bpf,
		struct netlink_ext_ack *extack)
{}

/* This is the main xdp call used by kernel to set/unset eBPF program. */
int
vmxnet3_xdp(struct net_device *netdev, struct netdev_bpf *bpf)
{}

static int
vmxnet3_xdp_xmit_frame(struct vmxnet3_adapter *adapter,
		       struct xdp_frame *xdpf,
		       struct vmxnet3_tx_queue *tq, bool dma_map)
{}

static int
vmxnet3_xdp_xmit_back(struct vmxnet3_adapter *adapter,
		      struct xdp_frame *xdpf)
{}

/* ndo_xdp_xmit */
int
vmxnet3_xdp_xmit(struct net_device *dev,
		 int n, struct xdp_frame **frames, u32 flags)
{}

static int
vmxnet3_run_xdp(struct vmxnet3_rx_queue *rq, struct xdp_buff *xdp,
		struct bpf_prog *prog)
{}

static struct sk_buff *
vmxnet3_build_skb(struct vmxnet3_rx_queue *rq, struct page *page,
		  const struct xdp_buff *xdp)
{}

/* Handle packets from DataRing. */
int
vmxnet3_process_xdp_small(struct vmxnet3_adapter *adapter,
			  struct vmxnet3_rx_queue *rq,
			  void *data, int len,
			  struct sk_buff **skb_xdp_pass)
{}

int
vmxnet3_process_xdp(struct vmxnet3_adapter *adapter,
		    struct vmxnet3_rx_queue *rq,
		    struct Vmxnet3_RxCompDesc *rcd,
		    struct vmxnet3_rx_buf_info *rbi,
		    struct Vmxnet3_RxDesc *rxd,
		    struct sk_buff **skb_xdp_pass)
{}