Hi Maxim, Thank you for review. What I did with FANOUT is only to provide the defines of the values used for the fanout socket option and related flags and not enable or claim to enable fanout on systems in was not supported. In essence, I turned a compile error which happened whether you planned to enable fanout or not, into a run-time error only in the case you did attempt to use fanout on system without support for it. In other words, the patch turns this behavior: +----------------------------+--------------+------------------+ | Application / System | has FANOUT | no FANOUT | +-----------------------------+-------------+------------------+ | App requests fanout | Working | build failure | +-----------------------------+-------------+------------------+ | App does not request fanout | Working | *build failure* | +-----------------------------+-------------+------------------+
Into this behavior: +----------------------------+--------------+------------------+ | Application / System | has FANOUT | no FANOUT | +-----------------------------+-------------+------------------+ | App requests fanout | Working | run time failure | +-----------------------------+-------------+------------------+ | App does not request fanout | Working | *Working* | +-----------------------------+-------------+------------------+ Gilad Ben-Yossef Software Architect EZchip Technologies Ltd. 37 Israel Pollak Ave, Kiryat Gat 82025 ,Israel Tel: +972-4-959-6666 ext. 576, Fax: +972-8-681-1483 Mobile: +972-52-826-0388, US Mobile: +1-973-826-0388 Email: [email protected], Web: http://www.ezchip.com "Ethernet always wins." — Andy Bechtolsheim > -----Original Message----- > From: [email protected] [mailto:lng-odp- > [email protected]] On Behalf Of Maxim Uvarov > Sent: Tuesday, August 26, 2014 1:34 PM > To: [email protected] > Subject: Re: [lng-odp] [PATCH 0/2] odp_packet_socket: backwards > compatible wrappers > > Hello Gilad, > > This patches are good. I want to check one thing about it. > > Multi threaded app for raw sockets can reads the same packet in all > thread at > the same time if each thread reads from different sockets but source > address is the same. > To avoid that I did: > 527a305 single raw socket for all threads > > In case with mmap/fanout each thread binded to different cpus will > receive packets fanout-ed > by the kernel. So packets to that threads will not duplicate. > > In your patch you defined fanout for case if it's not supported. So that > fanout will not work. > Can you please check that threads do not receive the same packets? > > Thank you, > Maxim. > > On 08/24/2014 02:53 PM, Gilad Ben-Yossef wrote: > > From: Gilad Ben-Yossef <[email protected]> > > > > The following patch set provides backward compatability wrappers > > for defines and functions needed to get ODP built and examples > > run on older systems without sendmmsg and PACKET_FANOUT support > > in either kernel or libc. > > > > Specifically, with this patch set I get ODP built and examples > > run on a CentOS 6.5 host, where the build was previously failing. > > > > The patches have zero effect (build or run time) on systems where > > ODP was building before. > > > > Since ODP now builds and run on CentOS 6.5 with kernel version 2.6.x, > > I also dropped the 3.x dependency. > > > > Only minimal testing (I ran a couple of the examples) were done for > > newly supported systems. > > > > Signed-off-by: Gilad Ben-Yossef <[email protected]> > > > > Gilad Ben-Yossef (2): > > odp_packet_socket: define PACKET_FANOUT if needed > > odp_packet_socket: add backwards compatible sendmmsg wrapper > > > > DEPENDENCIES | 4 +- > > platform/linux-generic/include/odp_packet_socket.h | 10 ++++++ > > platform/linux-generic/odp_packet_socket.c | 32 > ++++++++++++++++++++ > > 3 files changed, 44 insertions(+), 2 deletions(-) > > > > > > _______________________________________________ > > lng-odp mailing list > > [email protected] > > http://lists.linaro.org/mailman/listinfo/lng-odp > > > _______________________________________________ > lng-odp mailing list > [email protected] > http://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
