[dpdk-dev] dpdk16.11 RC2 package ipv4 reassembly example can't work
adrien.mazarguil at 6wind.com
Fri Nov 4 11:20:34 CET 2016
On Fri, Nov 04, 2016 at 06:36:30AM +0000, Lu, Wenzhuo wrote:
> Hi Adrien,
> > -----Original Message-----
> > From: Adrien Mazarguil [mailto:adrien.mazarguil at 6wind.com]
> > Sent: Wednesday, November 2, 2016 11:21 PM
> > To: Lu, Wenzhuo
> > Cc: Ananyev, Konstantin; Liu, Yu Y; Chen, WeichunX; Xu, HuilongX;
> > dev at dpdk.org
> > Subject: Re: dpdk16.11 RC2 package ipv4 reassembly example can't work
> > Hi all,
> > On Wed, Nov 02, 2016 at 08:39:31AM +0000, Lu, Wenzhuo wrote:
> > > Correct the typo of receiver.
> > >
> > > Hi Adrien,
> > > The change from struct ip_frag_pkt pkt to struct ip_frag_pkt pkt will
> > make IP reassembly not working. I think this is not the root cause. Maybe
> > Konstantin can give us some idea.
> > > But I notice one thing, you change some from  to , but others just add
> > '__extension__'. I believe if you add '__extension__' for struct ip_frag_pkt pkt,
> > we'll not hit this issue. Just curious why you use 2 ways to resolve the same
> > problem.
> > I've used the __extension__ method whenever the C99 syntax could not work
> > due to invalid usage in the code, e.g. a flexible array cannot be the only member
> > of a struct, you cannot make arrays out of structures that contain such fields,
> > while there is no such constraint with the GNU syntax.
> > For example see __extension__ uint8_t action_data in struct
> > rte_pipeline_table_entry. The C99 could not be used because of
> > test_table_acl.c:
> > struct rte_pipeline_table_entry entries;
> > If replacing ip_frag_pkt with __extension__ ip_frag_pkt pkt in rte_ip_frag.h
> > solves the issue, either some code is breaking some constraint somewhere or
> > this change broke the ABI (unlikely considering a simple recompilation should
> > have taken care of the issue). I did not notice any change in sizeof(struct
> > rte_ip_frag_tbl) nor offsetof(struct rte_ip_frag_tbl, pkt) on my setup, perhaps
> > the compilation flags used in your test affect them somehow.
> Thanks for your explanation. I also checked sizeof(struct rte_ip_frag_tbl). I don't see any change either.
> > Can you confirm whether only reverting this particular field solves the issue?
> Yes. ip_frag_pkt pkt or even ip_frag_pkt pkt can work but ip_frag_pkt pkt cannot :(
> Do you like the idea of changing the ip_frag_pkt to __extension__ ip_frag_pkt pkt?
Yes, restoring the original code (with __extension__) as a workaround until
we understand what is going on is safer, that's fine by me. The commit log
should explicitly state that weirdness occurs for an unknown reason with the
C99 syntax though (compiler bug is also a possibility).
More information about the dev