net/mlx5: allow to match TTL option

Message ID 1574163212-28868-1-git-send-email-xiangxia.m.yue@gmail.com (mailing list archive)
State Changes Requested, archived
Headers
Series net/mlx5: allow to match TTL option |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Tonghao Zhang Nov. 19, 2019, 11:33 a.m. UTC
  From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

For example, Open vSwitch may offload tunnel flows
to hardware and the tunnel TTL option is 64 and its
mask is 0xff as default. Allow to match IPv4 TTL option.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d677de817ded..b9bb3feefbc8 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1523,6 +1523,7 @@  mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
 			.src_addr = RTE_BE32(0xffffffff),
 			.dst_addr = RTE_BE32(0xffffffff),
 			.type_of_service = 0xff,
+			.time_to_live = 0xff,
 			.next_proto_id = 0xff,
 		},
 	};