lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Apr 2008 12:50:27 +1000
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	David Miller <davem@...emloft.net>
Cc:	virtualization@...ts.linux-foundation.org,
	herbert@...dor.apana.org.au, virtualization@...ts.osdl.org,
	netdev@...r.kernel.org
Subject: Re: [6/6] [VIRTIO] net: Allow receiving SG packets

On Tuesday 22 April 2008 06:04:18 David Miller wrote:
> From: Rusty Russell <rusty@...tcorp.com.au>
> Date: Tue, 22 Apr 2008 05:06:16 +1000
>
> > I'm not sure what the right number is here.  Say worst case is header
> > which goes over a page boundary then MAX_SKB_FRAGS in the skb, but for
> > some reason that already has a +2:
> >
> > /* To allow 64K frame to be packed as single skb without frag_list */
> > #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
> >
> > Unless someone explains, I'll change the xmit sg to 2+MAX_SKB_FRAGS as
> > well.
>
> MAX_SKB_FRAGS + 1 is what you ought to need.

Right, and so that's +2 for virtio_net because we have an extra header as  
Herbert points out.

But I was curious as to why the +2 in the MAX_SKB_FRAGS definition?

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ