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=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

Reply via email to