[dpdk-dev] [PATCH] drivers/net: do not redefine bool
Thomas Monjalon
thomas at monjalon.net
Wed Oct 3 21:16:13 CEST 2018
03/10/2018 16:11, Ferruh Yigit:
> On 9/25/2018 10:04 AM, Thomas Monjalon wrote:
> > 25/09/2018 10:03, Ferruh Yigit:
> >> On 9/24/2018 5:59 PM, Thomas Monjalon wrote:
> >>>>> --- a/drivers/net/ixgbe/ixgbe_rxtx.c
> >>>>> +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
> >>>>> @@ -2025,7 +2025,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts,
> >>>>> struct ixgbe_rx_entry *next_rxe = NULL;
> >>>>> struct rte_mbuf *first_seg;
> >>>>> struct rte_mbuf *rxm;
> >>>>> - struct rte_mbuf *nmb;
> >>>>> + struct rte_mbuf *nmb = NULL;
> >>>>
> >>>> This change is unrelated. Can we separate this one?
> >>>
> >>> Yes it looks unrelated but it becomes necessary when including stdbool.h.
> >>> I don't know the root cause, but yes, it may deserve a separate commit.
> >>> Maybe an ixgbe maintainer can take care of it?
> >>
> >> Why becomes necessary? Does it give a build warning etc?
> >> My concern is this is in data path, one extra assignment, it would be better to
> >> confirm it is really needed.
> >
> > Yes I had a compilation error.
> > If you cannot reproduce it, I will try to re-run my compilation tests.
>
> I got the error with gcc [1] but it seems false positive and only generated when
> <stdbool.h> included in ixgbe_rxtx.c, so this is an odd one, I am not able to
> find root cause.
>
> But since it is false positive, what do you think adding compiler option to
> disable this warning for this file?
I don't like disabling warnings on files.
We can take time to work on this patch. It is not required for 18.11.
> [1]
> .../drivers/net/ixgbe/ixgbe_rxtx.c:2139:14: error: ‘nmb’ may be used
> uninitialized in this function [-Werror=maybe-uninitialized]
> rxe->mbuf = nmb;
> ~~~~~~~~~~^~~~~
>
> $ gcc --version
> gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)
More information about the dev
mailing list