After you boot try running "dmesg | grep DMAR" if you are running an Intel system. If it doesn't show anything odds are you probably don't have an IOMMU enabled.
As for my earlier statement. When packet split is enabled we receive the packets into 1/2 page buffers. We then allocate an skb and copy the header from the packet into the skb->data portion. The entire packet is still in the 1/2 page buffer, but the pointer is now pointing to the end of the header, or start of the data section of the packet depending on how you want to look at it. So if you subtract skb_headlen(skb) from the pointer to the page you will have the start of the Rx packet that is still in the paged buffer. Thanks, Alex On 10/07/2013 07:07 PM, Yan, Liming (NSN - CN/Hangzhou) wrote: > Hi, > Thanks for your response very much. > For the first, how to check if IOMMU enabled? I zcat the kernel config > file. Does this mean IOMMU enabled? > > # zcat /proc/config.gz |grep MMU > CONFIG_MMU=y > # CONFIG_CALGARY_IOMMU is not set > # CONFIG_AMD_IOMMU is not set > CONFIG_IOMMU_HELPER=y > # CONFIG_IOMMU_API is not set > CONFIG_MMU_NOTIFIER=y > # CONFIG_IOMMU_STRESS is not set > > Second, in sending side, we're always using dev_alloc_skb to allocate a > buffer that not more than 2K, so all packet data shall be in one page region. > I'm not sure what the 'header' means in the sentence 'the header will have > been copied out'? > > > ------^_^------ > Best Regards > Liming > > -----Original Message----- > From: ext Alexander Duyck [mailto:[email protected]] > Sent: Tuesday, October 01, 2013 1:26 AM > To: Yan, Liming (NSN - CN/Hangzhou) > Cc: [email protected]; Chi, Xiaobo (NSN - CN/Hangzhou) > Subject: Re: [E1000-devel] Query performance issue when using igb driver > > If you need linear buffers I would recommend using > CONFIG_IGB_DISABLE_PACKET_SPLIT. The only time this would not provide > higher performance in your case if your are running the driver on a > system with an IOMMU enabled. > > Another option depending on your packet format might be to simply use > the paged region as a linear buffer depending on what offset you need to > access. The entire buffer should be present in the paged portion of the > frame and the header will have been copied out. This actually provides > higher performance on most systems due to the fact that the sk_buff is > allocated locally for most sockets and as such doesn't incur as high an > overhead in cache misses. > > Thanks, > > Alex > > On 09/26/2013 11:34 PM, Yan, Liming (NSN - CN/Hangzhou) wrote: >> Hi, >> When I use igb driver to receive Ethernet packets, I found even if I send >> packet with only 1000 bytes length(MTU=1500), the received packets are >> non-linear. So I have to use skb_linearize to make it linear again in my >> module. Skb_linearize is a complicated process and there may be memory >> copying there so I think this will decrease the performance much. I >> searched network and found there's a macro 'CONFIG_IGB_DISABLE_PACKET_SPLIT' >> in igb driver that can be defined to disable the non-linear feature. >> Could anybody give comments for this? If I need linear buffer for >> received packets, shall I always define ' CONFIG_IGB_DISABLE_PACKET_SPLIT' ? >> Will this definition make my performance higher in my case? >> >> >> # ethtool -i bi0 >> driver: igb >> version: 2.4.12 >> firmware-version: 2.1-3 >> >> >> ------------------------------------------------------------------------------ >> October Webinars: Code for Performance >> Free Intel webinars can help you accelerate application performance. >> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most >> from >> the latest Intel processors and coprocessors. See abstracts and register > >> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk >> _______________________________________________ >> E1000-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/e1000-devel >> To learn more about Intel® Ethernet, visit >> http://communities.intel.com/community/wired ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
