Hi, Xiao
Other comments are all fixed. Left this one.
"fields & (~inset)" can't replace it. 

Qiming
-----Original Message-----
From: Wang, Xiao W 
Sent: Thursday, June 20, 2019 5:32 PM
To: Yang, Qiming <qiming.y...@intel.com>; dev@dpdk.org
Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Xing, Beilei <beilei.x...@intel.com>
Subject: RE: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API

Hi,

> -----Original Message-----
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Qiming Yang
> Sent: Thursday, June 20, 2019 1:35 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.y...@intel.com>
> Subject: [dpdk-dev] [PATCH v3 2/3] net/ice: add generic flow API
> 
> This patch adds ice_flow_create, ice_flow_destroy, ice_flow_flush and 
> ice_flow_validate support, these are used to handle all the generic 
> filters.
> 
> Signed-off-by: Qiming Yang <qiming.y...@intel.com>
> ---
>  drivers/net/ice/Makefile           |   1 +
>  drivers/net/ice/ice_ethdev.c       |  44 +++
>  drivers/net/ice/ice_ethdev.h       |   5 +
>  drivers/net/ice/ice_generic_flow.c | 682
> +++++++++++++++++++++++++++++++++++++
>  drivers/net/ice/ice_generic_flow.h | 654
> +++++++++++++++++++++++++++++++++++
>  drivers/net/ice/meson.build        |   1 +
>  6 files changed, 1387 insertions(+)
>  create mode 100644 drivers/net/ice/ice_generic_flow.c
>  create mode 100644 drivers/net/ice/ice_generic_flow.h
> 

[...]

> +
> +static int ice_flow_valid_inset(const struct rte_flow_item pattern[],
> +                     uint64_t inset, struct rte_flow_error *error) {
> +     uint64_t fields;
> +
> +     /* get valid field */
> +     fields = ice_get_flow_field(pattern, error);
> +     if ((!fields) || (fields && (!inset))) {

Maybe the intention is to : fields & (~inset), checking if the user's input set 
exceeds support scope.

> +             rte_flow_error_set(error, EINVAL,
> +                                RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
> +                                pattern,
> +                                "Invalid input set");
> +             return -rte_errno;
> +     }
> +
> +     return 0;

Reply via email to