[dpdk-dev] [PATCH v3 08/11] net/e1000: parse flex filter
Zhao1, Wei
wei.zhao1 at intel.com
Mon Jun 12 05:25:45 CEST 2017
Hi, Ferruh
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, June 9, 2017 8:23 PM
> To: Zhao1, Wei <wei.zhao1 at intel.com>; dev at dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 08/11] net/e1000: parse flex filter
>
> On 6/9/2017 4:11 AM, Wei Zhao wrote:
> > check if the rule is a flex byte rule, and get the flex info.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
>
> <...>
>
> > + const struct rte_flow_item_raw *raw_mask;
> <...>
> > +
> > + if (!raw_mask->length ||
> > + !raw_mask->pattern ||
> > + !raw_mask->relative) {
>
> This gives following clang build error:
This "!raw_mask->pattern " is useless here, because there is check for this parameter
In the code behind, so I will delete it in v4.
for (index = 0; index < raw_spec->length; index++) {
if (raw_mask->pattern[index] != 0xFF) {
memset(filter, 0, sizeof(struct rte_eth_flex_filter));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
item, "Not supported by flex filter");
return -rte_errno;
}
}
>
> .../drivers/net/e1000/igb_flow.c:1094:17:
> error: address of array 'raw_mask->pattern' will always evaluate to 'true' [-
> Werror,-Wpointer-bool-conversion]
> !raw_mask->pattern ||
> ~~~~~~~~~~~^~~~~~~
> <...>
More information about the dev
mailing list