net/ixgbe: add more check in n-tuple filter
PATCH 1/1 net/ixgbe: add more check in n-tuple filter
Add more check on the mask of src_addr, dst_addr and next_proto_id in n-tuple filter rule pattern parser.If do not add such check, it maybe cause error in pattern parser.
--- drivers/net/ixgbe/ixgbe_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ixgbe/ixgbe_flow.c +4 -1
@@ -331,7 +331,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr, ipv4_mask->hdr.packet_id || ipv4_mask->hdr.fragment_offset || ipv4_mask->hdr.time_to_live || - ipv4_mask->hdr.hdr_checksum) { + ipv4_mask->hdr.hdr_checksum || + !ipv4_mask->hdr.next_proto_id || + !ipv4_mask->hdr.dst_addr || + !ipv4_mask->hdr.src_addr ||) {rte_flow_error_set (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM , item,"Not supported by ntuple filter" );
Signature · 1 line
2.5.5
Quoted 14 lines · Wei Zhao
Add more check on the mask of
src_addr,dst_addrandnext_proto_idin n-tuple filter rule pattern parser.If do not add such check, it maybe cause error in pattern parser.Signed-off-by zhao wei <[email protected]>--- drivers/net/ixgbe/ixgbe_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/net/ixgbe/ixgbe_flow.c +0
-0
drivers/net/ixgbe/ixgbe_flow.c cons_parse_ntuple_filter(const struct rte_flow_attr *attr, · line 337
Quoted 8 lines
drivers/net/ixgbe/ixgbe_flow.c +4
-1@@ -331,7 +331,10 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr, ipv4_mask->hdr.packet_id || ipv4_mask->hdr.fragment_offset || ipv4_mask->hdr.time_to_live || - ipv4_mask->hdr.hdr_checksum) { + ipv4_mask->hdr.hdr_checksum || + !ipv4_mask->hdr.next_proto_id || + !ipv4_mask->hdr.dst_addr || + !ipv4_mask->hdr.src_addr ||) {
The '||' at the end seems extra.
Also can you please confirm your sign off?
Quoted 4 lines
drivers/net/ixgbe/ixgbe_flow.c +0
-0rte_flow_error_set (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM , item,"Not supported by ntuple filter" );
Hi, Ferruh
Quoted 35 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, January 23, 2017 8:23 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: zhao wei <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filterdrivers/net/ixgbe/ixgbe_flow.c cons_parse_ntuple_filter(const struct
Quoted 14 lines · Wei Zhao
Add more check on the mask of
src_addr,dst_addrandnext_proto_idin n-tuple filter rule pattern parser.If do not add such check, it maybe cause error in pattern parser.Signed-off-by zhao wei <[email protected]>--- drivers/net/ixgbe/ixgbe_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/net/ixgbe/ixgbe_flow.cindex 82aceed..8f78eee 100644drivers/net/ixgbe/ixgbe_flow.c +0
-0@@ -331,7 +331,10 @@ cons_parse_ntuple_filter(const struct
rte_flow_attr*attr,drivers/net/ixgbe/ixgbe_flow.c cons_parse_ntuple_filter(const struct rte_flow_attr *attr, · line 337
Quoted 8 lines
drivers/net/ixgbe/ixgbe_flow.c +4
-1ipv4_mask->hdr.packet_id || ipv4_mask->hdr.fragment_offset || ipv4_mask->hdr.time_to_live || - ipv4_mask->hdr.hdr_checksum) { + ipv4_mask->hdr.hdr_checksum || + !ipv4_mask->hdr.next_proto_id || + !ipv4_mask->hdr.dst_addr || + !ipv4_mask->hdr.src_addr ||) {The '||' at the end seems extra.
Quoted 6 lines
Also can you please confirm your sign off?
Quoted 4 lines
drivers/net/ixgbe/ixgbe_flow.c +0
-0rte_flow_error_set (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM , item,"Not supported by ntuple filter" );
This patch has been change to suspended on patchwork net. Thank you.