Commit b070e703 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5e: TC, Allow sample action with CT

Allow sample+CT actions but still block sample+CT NAT
as it is not supported.
Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 7843bd60
......@@ -14,12 +14,6 @@ tc_act_can_offload_ct(struct mlx5e_tc_act_parse_state *parse_state,
bool clear_action = act->ct.action & TCA_CT_ACT_CLEAR;
struct netlink_ext_ack *extack = parse_state->extack;
if (flow_flag_test(parse_state->flow, SAMPLE)) {
NL_SET_ERR_MSG_MOD(extack,
"Sample action with connection tracking is not supported");
return false;
}
if (parse_state->ct && !clear_action) {
NL_SET_ERR_MSG_MOD(extack, "Multiple CT actions are not supported");
return false;
......
......@@ -13,10 +13,12 @@ tc_act_can_offload_sample(struct mlx5e_tc_act_parse_state *parse_state,
struct mlx5_flow_attr *attr)
{
struct netlink_ext_ack *extack = parse_state->extack;
bool ct_nat;
if (flow_flag_test(parse_state->flow, CT)) {
NL_SET_ERR_MSG_MOD(extack,
"Sample action with connection tracking is not supported");
ct_nat = attr->ct_attr.ct_action & TCA_CT_ACT_NAT;
if (flow_flag_test(parse_state->flow, CT) && ct_nat) {
NL_SET_ERR_MSG_MOD(extack, "Sample action with CT NAT is not supported");
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment