diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-02-06 16:55:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-07 13:31:00 -0500 |
commit | c6d30e8391b85e00eb544e6cf047ee0160ee9938 (patch) | |
tree | 4204297fe6a0fe740463c0583682b3fe8f352241 /drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | |
parent | fa3e93e86cc3d1809fba67cb138883ed4bb74a5f (diff) | |
download | lwn-c6d30e8391b85e00eb544e6cf047ee0160ee9938.tar.gz lwn-c6d30e8391b85e00eb544e6cf047ee0160ee9938.zip |
bnxt_en: Add basic XDP support.
Add basic ndo_xdp support to setup and query program, configure the NIC
to run in rx page mode, and support XDP_PASS, XDP_DROP, XDP_ABORTED
actions only.
v3: Pass modified offset and length to stack for XDP_PASS.
Remove Kconfig option.
v2: Added trace_xdp_exception()
Added dma_syncs.
Added XDP headroom support.
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Tested-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h new file mode 100644 index 000000000000..0bb7b7d97ec3 --- /dev/null +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h @@ -0,0 +1,18 @@ +/* Broadcom NetXtreme-C/E network driver. + * + * Copyright (c) 2016-2017 Broadcom Limited + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + */ + +#ifndef BNXT_XDP_H +#define BNXT_XDP_H + +bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons, + struct page *page, u8 **data_ptr, unsigned int *len, + u8 *event); +int bnxt_xdp(struct net_device *dev, struct netdev_xdp *xdp); + +#endif |