[dpdk-dev] [PATCH v3 3/3] net/cxgbe: add flow actions to modify IP and TCP/UDP port address

Ferruh Yigit ferruh.yigit at intel.com
Tue Oct 9 14:25:09 CEST 2018


On 10/9/2018 9:44 AM, Rahul Lakkireddy wrote:
> Query firmware for the new filter work request to offload flows with
> actions to modify IP and TCP/UDP port addresses. When available,
> translate IP and TCP/UDP port address modify actions to internal
> hardware specification and offload the flow to hardware.
> 
> Original work by Shagun Agrawal
> 
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>

<...>

> @@ -458,6 +611,16 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow,
>  		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
>  		case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN:
>  		case RTE_FLOW_ACTION_TYPE_PHY_PORT:
> +		case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC:
> +		case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST:
> +			nat_ipv4++;
> +			goto action_switch;
> +		case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
> +		case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
> +			nat_ipv6++;
> +		case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
> +		case RTE_FLOW_ACTION_TYPE_SET_TP_DST:

This is causing build error [1], fall through seems OK/intended, I will add [2]
while merging to clarify it. Please shout if you prefer another fix.

[1]
.../drivers/net/cxgbe/cxgbe_flow.c: In function ‘cxgbe_rtef_parse_actions’:
.../drivers/net/cxgbe/cxgbe_flow.c:620:12: error: this statement may fall
through [-Werror=implicit-fallthrough=]
    nat_ipv6++;
    ~~~~~~~~^~
.../drivers/net/cxgbe/cxgbe_flow.c:621:3: note: here
   case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
   ^~~~


[2]
 diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
 index 52cb3bdf4..3e4acf333 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.c
 +++ b/drivers/net/cxgbe/cxgbe_flow.c
 @@ -618,6 +618,7 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow,
                 case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC:
                 case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST:
                         nat_ipv6++;
 +                       goto action_switch;
                 case RTE_FLOW_ACTION_TYPE_SET_TP_SRC:
                 case RTE_FLOW_ACTION_TYPE_SET_TP_DST:
  action_switch:


More information about the dev mailing list