mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
7843bd6040
commit
b070e70381
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user