* Added support for rx_burst_mode_get and tx_burst_mode_get.
* Added vector mode support for ARM CPUs.
* Added support for VLAN push and pop actions.
+ * Added support for NAT action items.
* **Updated Mellanox mlx5 driver.**
BNXT_TF_DBG(ERR, "Parse Error: Vlan pcp arg is invalid\n");
return BNXT_TF_RC_ERROR;
}
+
+/* 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)
+{
+ const struct rte_flow_action_set_ipv4 *set_ipv4;
+ struct ulp_rte_act_prop *act = ¶ms->act_prop;
+
+ set_ipv4 = action_item->conf;
+ if (set_ipv4) {
+ memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_IPV4_SRC],
+ &set_ipv4->ipv4_addr, BNXT_ULP_ACT_PROP_SZ_SET_IPV4_SRC);
+ /* Update the hdr_bitmap with set ipv4 src */
+ ULP_BITMAP_SET(params->act_bitmap.bits,
+ BNXT_ULP_ACTION_BIT_SET_IPV4_SRC);
+ return BNXT_TF_RC_SUCCESS;
+ }
+ BNXT_TF_DBG(ERR, "Parse Error: set ipv4 src arg is invalid\n");
+ return BNXT_TF_RC_ERROR;
+}
+
+/* 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)
+{
+ const struct rte_flow_action_set_ipv4 *set_ipv4;
+ struct ulp_rte_act_prop *act = ¶ms->act_prop;
+
+ set_ipv4 = action_item->conf;
+ if (set_ipv4) {
+ memcpy(&act->act_details[BNXT_ULP_ACT_PROP_IDX_SET_IPV4_DST],
+ &set_ipv4->ipv4_addr, BNXT_ULP_ACT_PROP_SZ_SET_IPV4_DST);
+ /* Update the hdr_bitmap with set ipv4 dst */
+ ULP_BITMAP_SET(params->act_bitmap.bits,
+ BNXT_ULP_ACTION_BIT_SET_IPV4_DST);
+ return BNXT_TF_RC_SUCCESS;
+ }
+ BNXT_TF_DBG(ERR, "Parse Error: set ipv4 dst arg is invalid\n");
+ return BNXT_TF_RC_ERROR;
+}
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);
+
#endif /* _ULP_RTE_PARSER_H_ */
#ifndef ULP_TEMPLATE_DB_H_
#define ULP_TEMPLATE_DB_H_
-#define BNXT_ULP_REGFILE_MAX_SZ 17
+#define BNXT_ULP_REGFILE_MAX_SZ 19
#define BNXT_ULP_MAX_NUM_DEVICES 4
#define BNXT_ULP_LOG2_MAX_NUM_DEV 2
#define BNXT_ULP_CACHE_TBL_MAX_SZ 4
BNXT_ULP_REGFILE_INDEX_CRITICAL_RESOURCE = 14,
BNXT_ULP_REGFILE_INDEX_FLOW_CNTR_PTR_0 = 15,
BNXT_ULP_REGFILE_INDEX_MAIN_SP_PTR = 16,
- BNXT_ULP_REGFILE_INDEX_LAST = 17
+ BNXT_ULP_REGFILE_INDEX_MODIFY_IPV4_SRC_PTR_0 = 17,
+ BNXT_ULP_REGFILE_INDEX_MODIFY_IPV4_DST_PTR_0 = 18,
+ BNXT_ULP_REGFILE_INDEX_LAST = 19
};
enum bnxt_ulp_search_before_alloc {
.proto_act_func = NULL
},
[RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC] = {
- .act_type = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,
- .proto_act_func = NULL
+ .act_type = BNXT_ULP_ACT_TYPE_SUPPORTED,
+ .proto_act_func = ulp_rte_set_ipv4_src_act_handler
},
[RTE_FLOW_ACTION_TYPE_SET_IPV4_DST] = {
- .act_type = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,
- .proto_act_func = NULL
+ .act_type = BNXT_ULP_ACT_TYPE_SUPPORTED,
+ .proto_act_func = ulp_rte_set_ipv4_dst_act_handler
},
[RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC] = {
.act_type = BNXT_ULP_ACT_TYPE_NOT_SUPPORTED,