aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@broadcom.com>2017-08-28 13:40:33 -0400
committerDavid S. Miller <davem@davemloft.net>2017-08-28 16:57:10 -0700
commit2ae7408fedfee979e01ed3801223c632bb124c46 (patch)
tree539e6f6d123b9f4ca9277d3d911962023509197e /drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
parentbnxt_en: fix clearing devlink ptr from bnxt struct (diff)
downloadlinux-dev-2ae7408fedfee979e01ed3801223c632bb124c46.tar.xz
linux-dev-2ae7408fedfee979e01ed3801223c632bb124c46.zip
bnxt_en: bnxt: add TC flower filter offload support
This patch adds support for offloading TC based flow rules and actions for the 'flower' classifier in the bnxt_en driver. It includes logic to parse flow rules and actions received from the TC subsystem, store them and issue the corresponding hwrm_cfa_flow_alloc/free FW cmds. L2/IPv4/IPv6 flows and drop, redir, vlan push/pop actions are supported in this patch. In this patch the hwrm_cfa_flow_xxx routines are just stubs. The code for these routines is introduced in the next patch for easier review. Also, the code to query the TC/flower action stats will be introduced in a subsequent patch. Signed-off-by: Sathya Perla <sathya.perla@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
index 3e997c9e2580..d8b5f89427fa 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.h
@@ -45,6 +45,14 @@ void bnxt_vf_reps_open(struct bnxt *bp);
void bnxt_vf_rep_rx(struct bnxt *bp, struct sk_buff *skb);
struct net_device *bnxt_get_vf_rep(struct bnxt *bp, u16 cfa_code);
+static inline u16 bnxt_vf_rep_get_fid(struct net_device *dev)
+{
+ struct bnxt_vf_rep *vf_rep = netdev_priv(dev);
+ struct bnxt *bp = vf_rep->bp;
+
+ return bp->pf.vf[vf_rep->vf_idx].fw_fid;
+}
+
#else
static inline int bnxt_dl_register(struct bnxt *bp)