Skip to content

Commit b83d3f5

Browse files
committed
netdev-offload-dpdk: Clean up vlan_push action function.
Rename parse_vlan_push_action() to add_vlan_push_action() as it is inconsistent with other add/parse action functions. Seen as it unconditionally returns 0 might as well change to return void too. Also, a redundant return code check is removed. Signed-off-by: Kevin Traynor <[email protected]> Reviewed-by: David Marchand <[email protected]> Acked-by: Ilya Maximets <[email protected]>
1 parent 0087594 commit b83d3f5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

lib/netdev-offload-dpdk.c

+5-8
Original file line numberDiff line numberDiff line change
@@ -2075,9 +2075,9 @@ add_vxlan_encap_action(struct flow_actions *actions,
20752075
return -1;
20762076
}
20772077

2078-
static int
2079-
parse_vlan_push_action(struct flow_actions *actions,
2080-
const struct ovs_action_push_vlan *vlan_push)
2078+
static void
2079+
add_vlan_push_action(struct flow_actions *actions,
2080+
const struct ovs_action_push_vlan *vlan_push)
20812081
{
20822082
struct rte_flow_action_of_push_vlan *rte_push_vlan;
20832083
struct rte_flow_action_of_set_vlan_pcp *rte_vlan_pcp;
@@ -2096,7 +2096,6 @@ parse_vlan_push_action(struct flow_actions *actions,
20962096
rte_vlan_vid->vlan_vid = htons(vlan_tci_to_vid(vlan_push->vlan_tci));
20972097
add_flow_action(actions, RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID,
20982098
rte_vlan_vid);
2099-
return 0;
21002099
}
21012100

21022101
static void
@@ -2139,7 +2138,7 @@ parse_clone_actions(struct netdev *netdev,
21392138
}
21402139
} else if (clone_type == OVS_ACTION_ATTR_PUSH_VLAN) {
21412140
const struct ovs_action_push_vlan *vlan = nl_attr_get(ca);
2142-
parse_vlan_push_action(actions, vlan);
2141+
add_vlan_push_action(actions, vlan);
21432142
} else {
21442143
VLOG_DBG_RL(&rl,
21452144
"Unsupported nested action inside clone(), "
@@ -2233,9 +2232,7 @@ parse_flow_actions(struct netdev *netdev,
22332232
} else if (nl_attr_type(nla) == OVS_ACTION_ATTR_PUSH_VLAN) {
22342233
const struct ovs_action_push_vlan *vlan = nl_attr_get(nla);
22352234

2236-
if (parse_vlan_push_action(actions, vlan)) {
2237-
return -1;
2238-
}
2235+
add_vlan_push_action(actions, vlan);
22392236
} else if (nl_attr_type(nla) == OVS_ACTION_ATTR_POP_VLAN) {
22402237
add_flow_action(actions, RTE_FLOW_ACTION_TYPE_OF_POP_VLAN, NULL);
22412238
} else if (nl_attr_type(nla) == OVS_ACTION_ATTR_TUNNEL_PUSH) {

0 commit comments

Comments
 (0)