X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fbnxt%2Ftf_ulp%2Fulp_rte_parser.h;h=4431f1bbd0a65d5f71da075a57da0064a77d57e8;hb=1e5acc5be59bae297e75d4ba14ee2b625df40fa1;hp=49e9cbb4cb2848e431ee8e2f278f2581b141d3b3;hpb=14f260c0b353a9b8404c32cc5b695b11ca1f6392;p=dpdk.git diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h index 49e9cbb4cb..4431f1bbd0 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2014-2020 Broadcom + * Copyright(c) 2014-2021 Broadcom * All rights reserved. */ @@ -11,15 +11,20 @@ #include #include "ulp_template_db_enum.h" #include "ulp_template_struct.h" +#include "ulp_mapper.h" +#include "bnxt_tf_common.h" /* defines to be used in the tunnel header parsing */ #define BNXT_ULP_ENCAP_IPV4_VER_HLEN_TOS 2 #define BNXT_ULP_ENCAP_IPV4_ID_PROTO 6 #define BNXT_ULP_ENCAP_IPV4_DEST_IP 4 #define BNXT_ULP_ENCAP_IPV4_SIZE 12 -#define BNXT_ULP_ENCAP_IPV6_SIZE 8 +#define BNXT_ULP_ENCAP_IPV6_VTC_FLOW 4 +#define BNXT_ULP_ENCAP_IPV6_PROTO_TTL 2 +#define BNXT_ULP_ENCAP_IPV6_DO 2 +#define BNXT_ULP_ENCAP_IPV6_SIZE 24 #define BNXT_ULP_ENCAP_UDP_SIZE 4 -#define BNXT_ULP_INVALID_SVIF_VAL -1U +#define BNXT_ULP_INVALID_SVIF_VAL -1UL #define BNXT_ULP_GET_IPV6_VER(vtcf) \ (((vtcf) & BNXT_ULP_PARSER_IPV6_VER_MASK) >> 28) @@ -31,13 +36,25 @@ #define BNXT_ULP_PARSER_IPV6_TC 0x0ff00000 #define BNXT_ULP_PARSER_IPV6_FLOW_LABEL 0x000fffff +enum bnxt_ulp_prsr_action { + ULP_PRSR_ACT_DEFAULT = 0, + ULP_PRSR_ACT_MATCH_IGNORE = 1, + ULP_PRSR_ACT_MASK_IGNORE = 2, + ULP_PRSR_ACT_SPEC_IGNORE = 4 +}; + +void +bnxt_ulp_init_mapper_params(struct bnxt_ulp_mapper_create_parms *mapper_cparms, + struct ulp_rte_parser_params *params, + enum bnxt_ulp_fdb_type flow_type); + /* Function to handle the parsing of the RTE port id. */ int32_t -ulp_rte_parser_svif_process(struct ulp_rte_parser_params *params); +ulp_rte_parser_implicit_match_port_process(struct ulp_rte_parser_params *param); /* Function to handle the implicit action port id */ int32_t -ulp_rte_parser_implied_act_port_process(struct ulp_rte_parser_params *params); +ulp_rte_parser_implicit_act_port_process(struct ulp_rte_parser_params *params); /* * Function to handle the parsing of RTE Flows and placing @@ -55,6 +72,12 @@ int32_t bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[], struct ulp_rte_parser_params *params); +/* + * Function to handle the post processing of the parsing details + */ +int32_t +bnxt_ulp_rte_parser_post_process(struct ulp_rte_parser_params *params); + /* Function to handle the parsing of RTE Flow item PF Header. */ int32_t ulp_rte_pf_hdr_handler(const struct rte_flow_item *item, @@ -110,6 +133,25 @@ int32_t ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item, struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow item GRE Header. */ +int32_t +ulp_rte_gre_hdr_handler(const struct rte_flow_item *item, + struct ulp_rte_parser_params *params); + +int32_t +ulp_rte_item_any_handler(const struct rte_flow_item *item __rte_unused, + struct ulp_rte_parser_params *params __rte_unused); + +/* Function to handle the parsing of RTE Flow item ICMP Header. */ +int32_t +ulp_rte_icmp_hdr_handler(const struct rte_flow_item *item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow item ICMP6 Header. */ +int32_t +ulp_rte_icmp6_hdr_handler(const struct rte_flow_item *item, + struct ulp_rte_parser_params *params); + /* Function to handle the parsing of RTE Flow item void Header. */ int32_t ulp_rte_void_hdr_handler(const struct rte_flow_item *item, @@ -190,4 +232,42 @@ int32_t ulp_rte_of_set_vlan_pcp_act_handler(const struct rte_flow_action *action_item, struct ulp_rte_parser_params *params); +/* Function to handle the parsing of RTE Flow action set ipv4 src.*/ +int32_t +ulp_rte_set_ipv4_src_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action set ipv4 dst.*/ +int32_t +ulp_rte_set_ipv4_dst_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action set tp src.*/ +int32_t +ulp_rte_set_tp_src_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action set tp dst.*/ +int32_t +ulp_rte_set_tp_dst_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action dec ttl.*/ +int32_t +ulp_rte_dec_ttl_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +/* Function to handle the parsing of RTE Flow action JUMP .*/ +int32_t +ulp_rte_jump_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +int32_t +ulp_rte_sample_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + +int32_t +ulp_rte_shared_act_handler(const struct rte_flow_action *action_item, + struct ulp_rte_parser_params *params); + #endif /* _ULP_RTE_PARSER_H_ */