1 /* Broadcom NetXtreme-C/E network driver.
3 * Copyright (c) 2016-2017 Broadcom Limited
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation.
13 DECLARE_STATIC_KEY_FALSE(bnxt_xdp_locking_key
);
15 struct bnxt_sw_tx_bd
*bnxt_xmit_bd(struct bnxt
*bp
,
16 struct bnxt_tx_ring_info
*txr
,
17 dma_addr_t mapping
, u32 len
,
18 struct xdp_buff
*xdp
);
19 void bnxt_tx_int_xdp(struct bnxt
*bp
, struct bnxt_napi
*bnapi
, int budget
);
20 bool bnxt_rx_xdp(struct bnxt
*bp
, struct bnxt_rx_ring_info
*rxr
, u16 cons
,
21 struct xdp_buff
*xdp
, struct page
*page
, u8
**data_ptr
,
22 unsigned int *len
, u8
*event
);
23 int bnxt_xdp(struct net_device
*dev
, struct netdev_bpf
*xdp
);
24 int bnxt_xdp_xmit(struct net_device
*dev
, int num_frames
,
25 struct xdp_frame
**frames
, u32 flags
);
27 bool bnxt_xdp_attached(struct bnxt
*bp
, struct bnxt_rx_ring_info
*rxr
);
29 void bnxt_xdp_buff_init(struct bnxt
*bp
, struct bnxt_rx_ring_info
*rxr
,
30 u16 cons
, u8
*data_ptr
, unsigned int len
,
31 struct xdp_buff
*xdp
);
32 void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info
*rxr
,
33 struct xdp_buff
*xdp
);
34 struct sk_buff
*bnxt_xdp_build_skb(struct bnxt
*bp
, struct sk_buff
*skb
,
35 u8 num_frags
, struct page_pool
*pool
,
37 struct rx_cmp_ext
*rxcmp1
);