* [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filter
@ 2017-01-23 3:32 Wei Zhao
2017-01-23 12:22 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Wei Zhao @ 2017-01-23 3:32 UTC (permalink / raw)
To: dev; +Cc: zhao wei
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.
Signed-off-by: zhao wei <wei.zhao1@gmail.com>
---
drivers/net/ixgbe/ixgbe_flow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 82aceed..8f78eee 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -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");
--
2.5.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filter
2017-01-23 3:32 [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filter Wei Zhao
@ 2017-01-23 12:22 ` Ferruh Yigit
2017-02-03 1:21 ` Zhao1, Wei
0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2017-01-23 12:22 UTC (permalink / raw)
To: Wei Zhao, dev; +Cc: zhao wei
On 1/23/2017 3:32 AM, Wei Zhao wrote:
> 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.
>
> Signed-off-by: zhao wei <wei.zhao1@gmail.com>
> ---
> drivers/net/ixgbe/ixgbe_flow.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
> index 82aceed..8f78eee 100644
> --- a/drivers/net/ixgbe/ixgbe_flow.c
> +++ b/drivers/net/ixgbe/ixgbe_flow.c
> @@ -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?
> rte_flow_error_set(error,
> EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
> item, "Not supported by ntuple filter");
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filter
2017-01-23 12:22 ` Ferruh Yigit
@ 2017-02-03 1:21 ` Zhao1, Wei
0 siblings, 0 replies; 3+ messages in thread
From: Zhao1, Wei @ 2017-02-03 1:21 UTC (permalink / raw)
To: Yigit, Ferruh, dev; +Cc: zhao wei
Hi, Ferruh
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Monday, January 23, 2017 8:23 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: zhao wei <wei.zhao1@gmail.com>
> Subject: Re: [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple
> filter
>
> On 1/23/2017 3:32 AM, Wei Zhao wrote:
> > 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.
> >
> > Signed-off-by: zhao wei <wei.zhao1@gmail.com>
> > ---
> > drivers/net/ixgbe/ixgbe_flow.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ixgbe/ixgbe_flow.c
> > b/drivers/net/ixgbe/ixgbe_flow.c index 82aceed..8f78eee 100644
> > --- a/drivers/net/ixgbe/ixgbe_flow.c
> > +++ b/drivers/net/ixgbe/ixgbe_flow.c
> > @@ -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?
>
> > rte_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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-03 1:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 3:32 [dpdk-dev] [PATCH v1] net/ixgbe: add more check in n-tuple filter Wei Zhao
2017-01-23 12:22 ` Ferruh Yigit
2017-02-03 1:21 ` Zhao1, Wei
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).