Skip to content

Commit 0d156f2

Browse files
ozshlomoSaeed Mahameed
authored andcommitted
net/mlx5e: CT: Fix ipv6 nat header rewrite actions
Set the ipv6 word fields according to the hardware definitions. Fixes: ac991b4 ("net/mlx5e: CT: Offload established flows") Signed-off-by: Oz Shlomo <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 98f91c4 commit 0d156f2

File tree

1 file changed

+8
-8
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en

1 file changed

+8
-8
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,21 +328,21 @@ mlx5_tc_ct_parse_mangle_to_mod_act(struct flow_action_entry *act,
328328

329329
case FLOW_ACT_MANGLE_HDR_TYPE_IP6:
330330
MLX5_SET(set_action_in, modact, length, 0);
331-
if (offset == offsetof(struct ipv6hdr, saddr))
331+
if (offset == offsetof(struct ipv6hdr, saddr) + 12)
332332
field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_31_0;
333-
else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
334-
field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
335333
else if (offset == offsetof(struct ipv6hdr, saddr) + 8)
334+
field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
335+
else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
336336
field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_95_64;
337-
else if (offset == offsetof(struct ipv6hdr, saddr) + 12)
337+
else if (offset == offsetof(struct ipv6hdr, saddr))
338338
field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_127_96;
339-
else if (offset == offsetof(struct ipv6hdr, daddr))
339+
else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
340340
field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_31_0;
341-
else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
342-
field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
343341
else if (offset == offsetof(struct ipv6hdr, daddr) + 8)
342+
field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
343+
else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
344344
field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_95_64;
345-
else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
345+
else if (offset == offsetof(struct ipv6hdr, daddr))
346346
field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_127_96;
347347
else
348348
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)