Back to home page

OSCL-LXR

 
 

    


0001 /* Broadcom NetXtreme-C/E network driver.
0002  *
0003  * Copyright (c) 2016-2017 Broadcom Limited
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation.
0008  */
0009 
0010 #ifndef BNXT_XDP_H
0011 #define BNXT_XDP_H
0012 
0013 DECLARE_STATIC_KEY_FALSE(bnxt_xdp_locking_key);
0014 
0015 struct bnxt_sw_tx_bd *bnxt_xmit_bd(struct bnxt *bp,
0016                    struct bnxt_tx_ring_info *txr,
0017                    dma_addr_t mapping, u32 len,
0018                    struct xdp_buff *xdp);
0019 void bnxt_tx_int_xdp(struct bnxt *bp, struct bnxt_napi *bnapi, int nr_pkts);
0020 bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
0021          struct xdp_buff xdp, struct page *page, unsigned int *len,
0022          u8 *event);
0023 int bnxt_xdp(struct net_device *dev, struct netdev_bpf *xdp);
0024 int bnxt_xdp_xmit(struct net_device *dev, int num_frames,
0025           struct xdp_frame **frames, u32 flags);
0026 
0027 bool bnxt_xdp_attached(struct bnxt *bp, struct bnxt_rx_ring_info *rxr);
0028 
0029 void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
0030             u16 cons, u8 **data_ptr, unsigned int *len,
0031             struct xdp_buff *xdp);
0032 void bnxt_xdp_buff_frags_free(struct bnxt_rx_ring_info *rxr,
0033                   struct xdp_buff *xdp);
0034 struct sk_buff *bnxt_xdp_build_skb(struct bnxt *bp, struct sk_buff *skb,
0035                    u8 num_frags, struct page_pool *pool,
0036                    struct xdp_buff *xdp,
0037                    struct rx_cmp_ext *rxcmp1);
0038 #endif