X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fcxgbe%2Fcxgbe_filter.h;h=46ebf833381e85eefa8944ed312d2f632b35887a;hb=18da3c854bb8105818dc23c36eecf3465596052a;hp=1964730ba32993b6dc9541fa07d5438a449f09f9;hpb=71e9b334a23764a5baa55cbacbdd99aeb9733631;p=dpdk.git diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h index 1964730ba3..46ebf83338 100644 --- a/drivers/net/cxgbe/cxgbe_filter.h +++ b/drivers/net/cxgbe/cxgbe_filter.h @@ -18,8 +18,8 @@ #define MATCHTYPE_BITWIDTH 3 #define PROTO_BITWIDTH 8 #define TOS_BITWIDTH 8 -#define PF_BITWIDTH 8 -#define VF_BITWIDTH 8 +#define PF_BITWIDTH 3 +#define VF_BITWIDTH 13 #define IVLAN_BITWIDTH 16 #define OVLAN_BITWIDTH 16 @@ -69,8 +69,10 @@ struct ch_filter_tuple { uint16_t lport; /* local port */ uint16_t fport; /* foreign port */ + uint8_t dmac[6]; /* Destination MAC to match */ + /* reservations for future additions */ - uint8_t rsvd[12]; + uint8_t rsvd[6]; }; /* @@ -100,8 +102,11 @@ struct ch_filter_specification { uint32_t iq:10; /* ingress queue */ uint32_t eport:2; /* egress port to switch packet out */ + uint32_t newsmac:1; /* rewrite source MAC address */ + uint32_t newdmac:1; /* rewrite destination MAC address */ uint32_t swapmac:1; /* swap SMAC/DMAC for loopback packet */ uint32_t newvlan:2; /* rewrite VLAN Tag */ + uint8_t smac[RTE_ETHER_ADDR_LEN]; /* new source MAC address */ uint8_t dmac[RTE_ETHER_ADDR_LEN]; /* new destination MAC address */ uint16_t vlan; /* VLAN Tag to insert */ @@ -180,6 +185,7 @@ struct filter_entry { struct filter_ctx *ctx; /* caller's completion hook */ struct clip_entry *clipt; /* CLIP Table entry for IPv6 */ struct l2t_entry *l2t; /* Layer Two Table entry for dmac */ + struct smt_entry *smt; /* Source Mac Table entry for smac */ struct rte_eth_dev *dev; /* Port's rte eth device */ void *private; /* For use by apps using filter_entry */ @@ -248,7 +254,8 @@ cxgbe_bitmap_find_free_region(struct rte_bitmap *bmap, unsigned int size, return idx; } -bool cxgbe_is_filter_set(struct tid_info *, int fidx, int family); +u8 cxgbe_filter_slots(struct adapter *adap, u8 family); +bool cxgbe_is_filter_set(struct tid_info *t, u32 fidx, u8 nentries); void cxgbe_filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl); int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id, struct ch_filter_specification *fs, @@ -256,7 +263,7 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id, int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id, struct ch_filter_specification *fs, struct filter_ctx *ctx); -int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family); +int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries); int cxgbe_init_hash_filter(struct adapter *adap); void cxgbe_hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl);