X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Focteontx2%2Fotx2_flow.h;h=82a5064d905b5083a670bc95eec71905d64df910;hb=0604b1f2208f54ae76030e437db40f9da558497b;hp=a37d86512d53a15aac16a97b56cba46f4978d54a;hpb=29a2017c7022eabf55c731d1274748e86eb1e6e8;p=dpdk.git diff --git a/drivers/net/octeontx2/otx2_flow.h b/drivers/net/octeontx2/otx2_flow.h index a37d86512d..82a5064d90 100644 --- a/drivers/net/octeontx2/otx2_flow.h +++ b/drivers/net/octeontx2/otx2_flow.h @@ -29,6 +29,8 @@ enum { #define NPC_IH_LENGTH 8 #define NPC_TPID_LENGTH 2 +#define NPC_HIGIG2_LENGTH 16 +#define NPC_MAX_RAW_ITEM_LEN 16 #define NPC_COUNTER_NONE (-1) /* 32 bytes from LDATA_CFG & 32 bytes from FLAGS_CFG */ #define NPC_MAX_EXTRACT_DATA_LEN (64) @@ -52,6 +54,12 @@ enum { #define OTX2_FLOW_ACT_DUP (1 << 5) #define OTX2_FLOW_ACT_SEC (1 << 6) #define OTX2_FLOW_ACT_COUNT (1 << 7) +#define OTX2_FLOW_ACT_PF (1 << 8) +#define OTX2_FLOW_ACT_VF (1 << 9) +#define OTX2_FLOW_ACT_VLAN_STRIP (1 << 10) +#define OTX2_FLOW_ACT_VLAN_INSERT (1 << 11) +#define OTX2_FLOW_ACT_VLAN_ETHTYPE_INSERT (1 << 12) +#define OTX2_FLOW_ACT_VLAN_PCP_INSERT (1 << 13) /* terminating actions */ #define OTX2_FLOW_ACT_TERM (OTX2_FLOW_ACT_DROP | \ @@ -87,6 +95,7 @@ struct npc_xtract_info { uint8_t hdr_off; /* Byte offset of proto hdr: extract_src */ uint8_t key_off; /* Byte offset in MCAM key where data is placed */ uint8_t enable; /* Extraction enabled or disabled */ + uint8_t flags_enable; /* Flags extraction enabled */ }; /* Information for a given {LAYER, LTYPE} */ @@ -141,6 +150,11 @@ struct otx2_mcam_ents_info { uint32_t live_ent; }; +struct otx2_flow_dump_data { + uint8_t lid; + uint16_t ltype; +}; + struct rte_flow { uint8_t nix_intf; uint32_t mcam_id; @@ -150,6 +164,9 @@ struct rte_flow { uint64_t mcam_data[OTX2_MAX_MCAM_WIDTH_DWORDS]; uint64_t mcam_mask[OTX2_MAX_MCAM_WIDTH_DWORDS]; uint64_t npc_action; + uint64_t vtag_action; + struct otx2_flow_dump_data dump_data[32]; + uint16_t num_patterns; TAILQ_ENTRY(rte_flow) next; }; @@ -158,6 +175,7 @@ TAILQ_HEAD(otx2_flow_list, rte_flow); /* Accessed from ethdev private - otx2_eth_dev */ struct otx2_npc_flow_info { rte_atomic32_t mark_actions; + uint32_t vtag_actions; uint32_t keyx_supp_nmask[NPC_MAX_INTF];/* nibble mask */ uint32_t keyx_len[NPC_MAX_INTF]; /* per intf key len in bits */ uint32_t datax_len[NPC_MAX_INTF]; /* per intf data len in bits */ @@ -187,6 +205,7 @@ struct otx2_npc_flow_info { uint16_t channel; /*rx channel */ uint16_t flow_prealloc_size; uint16_t flow_max_priority; + uint16_t switch_header_type; }; struct otx2_parse_state { @@ -202,6 +221,7 @@ struct otx2_parse_state { uint8_t flags[NPC_MAX_LID]; uint8_t *mcam_data; /* point to flow->mcam_data + key_len */ uint8_t *mcam_mask; /* point to flow->mcam_mask + key_len */ + bool is_vf; }; struct otx2_flow_item_info { @@ -378,6 +398,8 @@ int otx2_flow_parse_lb(struct otx2_parse_state *pst); int otx2_flow_parse_la(struct otx2_parse_state *pst); +int otx2_flow_parse_higig2_hdr(struct otx2_parse_state *pst); + int otx2_flow_parse_actions(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, const struct rte_flow_action actions[], @@ -388,9 +410,6 @@ int otx2_flow_free_all_resources(struct otx2_eth_dev *hw); int otx2_flow_parse_mpls(struct otx2_parse_state *pst, int lid); -int -flow_validate_and_shift_prio_ent(struct otx2_mbox *mbox, struct rte_flow *flow, - struct otx2_npc_flow_info *flow_info, - struct npc_mcam_alloc_entry_rsp *rsp, - int req_prio); +void otx2_flow_dump(FILE *file, struct otx2_eth_dev *hw, + struct rte_flow *flow); #endif /* __OTX2_FLOW_H__ */