uint32_t idx = params->field_idx;
uint32_t size;
uint32_t inner_l3, outer_l3;
+ uint32_t vtcf, vtcf_mask;
inner_l3 = ULP_COMP_FLD_IDX_RD(params, BNXT_ULP_CF_IDX_I_L3);
if (inner_l3) {
}
/*
- * Copy the rte_flow_item for ipv4 into hdr_field using ipv4
+ * Copy the rte_flow_item for ipv6 into hdr_field using ipv6
* header fields
*/
if (ipv6_spec) {
size = sizeof(ipv6_spec->hdr.vtc_flow);
+
+ vtcf = BNXT_ULP_GET_IPV6_VER(ipv6_spec->hdr.vtc_flow);
field = ulp_rte_parser_fld_copy(¶ms->hdr_field[idx],
- &ipv6_spec->hdr.vtc_flow,
+ &vtcf,
+ size);
+
+ vtcf = BNXT_ULP_GET_IPV6_TC(ipv6_spec->hdr.vtc_flow);
+ field = ulp_rte_parser_fld_copy(field,
+ &vtcf,
+ size);
+
+ vtcf = BNXT_ULP_GET_IPV6_FLOWLABEL(ipv6_spec->hdr.vtc_flow);
+ field = ulp_rte_parser_fld_copy(field,
+ &vtcf,
size);
+
size = sizeof(ipv6_spec->hdr.payload_len);
field = ulp_rte_parser_fld_copy(field,
&ipv6_spec->hdr.payload_len,
size);
}
if (ipv6_mask) {
+ size = sizeof(ipv6_mask->hdr.vtc_flow);
+
+ vtcf_mask = BNXT_ULP_GET_IPV6_VER(ipv6_mask->hdr.vtc_flow);
+ ulp_rte_prsr_mask_copy(params, &idx,
+ &vtcf_mask,
+ size);
+
+ vtcf_mask = BNXT_ULP_GET_IPV6_TC(ipv6_mask->hdr.vtc_flow);
ulp_rte_prsr_mask_copy(params, &idx,
- &ipv6_mask->hdr.vtc_flow,
- sizeof(ipv6_mask->hdr.vtc_flow));
+ &vtcf_mask,
+ size);
+
+ vtcf_mask =
+ BNXT_ULP_GET_IPV6_FLOWLABEL(ipv6_mask->hdr.vtc_flow);
+ ulp_rte_prsr_mask_copy(params, &idx,
+ &vtcf_mask,
+ size);
+
ulp_rte_prsr_mask_copy(params, &idx,
&ipv6_mask->hdr.payload_len,
sizeof(ipv6_mask->hdr.payload_len));
#define BNXT_ULP_ENCAP_UDP_SIZE 4
#define BNXT_ULP_INVALID_SVIF_VAL -1U
+#define BNXT_ULP_GET_IPV6_VER(vtcf) \
+ (((vtcf) & BNXT_ULP_PARSER_IPV6_VER_MASK) >> 28)
+#define BNXT_ULP_GET_IPV6_TC(vtcf) \
+ (((vtcf) & BNXT_ULP_PARSER_IPV6_TC) >> 20)
+#define BNXT_ULP_GET_IPV6_FLOWLABEL(vtcf) \
+ ((vtcf) & BNXT_ULP_PARSER_IPV6_FLOW_LABEL)
+#define BNXT_ULP_PARSER_IPV6_VER_MASK 0xf0000000
+#define BNXT_ULP_PARSER_IPV6_TC 0x0ff00000
+#define BNXT_ULP_PARSER_IPV6_FLOW_LABEL 0x000fffff
+
/* Function to handle the parsing of the RTE port id. */
int32_t
ulp_rte_parser_svif_process(struct ulp_rte_parser_params *params);
#define BNXT_ULP_PROTO_HDR_S_VLAN_NUM 3
#define BNXT_ULP_PROTO_HDR_VLAN_NUM 6
#define BNXT_ULP_PROTO_HDR_IPV4_NUM 10
-#define BNXT_ULP_PROTO_HDR_IPV6_NUM 6
+#define BNXT_ULP_PROTO_HDR_IPV6_NUM 8
#define BNXT_ULP_PROTO_HDR_UDP_NUM 4
#define BNXT_ULP_PROTO_HDR_TCP_NUM 9
#define BNXT_ULP_PROTO_HDR_VXLAN_NUM 4