BNXT_TF_DBG(ERR, "Parse Error: set ipv4 dst arg is invalid\n");
return BNXT_TF_RC_ERROR;
}
+
+/* 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)
+{
+ const struct rte_flow_action_set_tp *set_tp;
+ struct ulp_rte_act_prop *act = ¶ms->act_prop;
+
+ set_tp = action_item->conf;
+ if (set_tp) {
+ memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_TP_SRC],
+ &set_tp->port, BNXT_ULP_ACT_PROP_SZ_SET_TP_SRC);
+ /* Update the hdr_bitmap with set tp src */
+ ULP_BITMAP_SET(params->act_bitmap.bits,
+ BNXT_ULP_ACTION_BIT_SET_TP_SRC);
+ return BNXT_TF_RC_SUCCESS;
+ }
+
+ BNXT_TF_DBG(ERR, "Parse Error: set tp src arg is invalid\n");
+ return BNXT_TF_RC_ERROR;
+}
+
+/* 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)
+{
+ const struct rte_flow_action_set_tp *set_tp;
+ struct ulp_rte_act_prop *act = ¶ms->act_prop;
+
+ set_tp = action_item->conf;
+ if (set_tp) {
+ memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_TP_DST],
+ &set_tp->port, BNXT_ULP_ACT_PROP_SZ_SET_TP_DST);
+ /* Update the hdr_bitmap with set tp dst */
+ ULP_BITMAP_SET(params->act_bitmap.bits,
+ BNXT_ULP_ACTION_BIT_SET_TP_DST);
+ return BNXT_TF_RC_SUCCESS;
+ }
+
+ BNXT_TF_DBG(ERR, "Parse Error: set tp src arg is invalid\n");
+ return BNXT_TF_RC_ERROR;
+}
BNXT_ULP_ACT_PROP_SZ_SET_IPV4_DST = 4,
BNXT_ULP_ACT_PROP_SZ_SET_IPV6_SRC = 16,
BNXT_ULP_ACT_PROP_SZ_SET_IPV6_DST = 16,
- BNXT_ULP_ACT_PROP_SZ_SET_TP_SRC = 4,
- BNXT_ULP_ACT_PROP_SZ_SET_TP_DST = 4,
+ BNXT_ULP_ACT_PROP_SZ_SET_TP_SRC = 2,
+ BNXT_ULP_ACT_PROP_SZ_SET_TP_DST = 2,
BNXT_ULP_ACT_PROP_SZ_OF_PUSH_MPLS_0 = 4,
BNXT_ULP_ACT_PROP_SZ_OF_PUSH_MPLS_1 = 4,
BNXT_ULP_ACT_PROP_SZ_OF_PUSH_MPLS_2 = 4,
BNXT_ULP_ACT_PROP_IDX_SET_IPV6_SRC = 85,
BNXT_ULP_ACT_PROP_IDX_SET_IPV6_DST = 101,
BNXT_ULP_ACT_PROP_IDX_SET_TP_SRC = 117,
- BNXT_ULP_ACT_PROP_IDX_SET_TP_DST = 121,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_0 = 125,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_1 = 129,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_2 = 133,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_3 = 137,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_4 = 141,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_5 = 145,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_6 = 149,
- BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_7 = 153,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC = 157,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_SMAC = 163,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG = 169,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_IP = 177,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_IP_SRC = 209,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP = 225,
- BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN = 229,
- BNXT_ULP_ACT_PROP_IDX_LAST = 261
+ BNXT_ULP_ACT_PROP_IDX_SET_TP_DST = 119,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_0 = 121,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_1 = 125,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_2 = 129,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_3 = 133,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_4 = 137,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_5 = 141,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_6 = 145,
+ BNXT_ULP_ACT_PROP_IDX_OF_PUSH_MPLS_7 = 149,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_DMAC = 153,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_L2_SMAC = 159,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_VTAG = 165,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_IP = 173,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_IP_SRC = 205,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_UDP = 221,
+ BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN = 225,
+ BNXT_ULP_ACT_PROP_IDX_LAST = 257
};
enum bnxt_ulp_class_hid {