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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 6 Mar 2009 11:47:22 -0800
From:	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>
To:	Amar Mudrankit <amar.mudrankit@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: Query about skb scatter / gather

Amar Mudrankit wrote:
> Can I have a socket buffer received over network having protocol
> headers (IP, TCP/UDP/ICMP) in first page of skb_frags_t array of the
> skb?
> 
> So, in such a situation the skb->data is almost 0 and all the data
> along with headers is in pages listed in skb_frags_t array.
> 
> Can linux networking stack handle such socket buffer? Or is it
> mandatory that, at least some minimum data should be accessible
> through skb->data and rest can be in pages described in skb_frags_t
> array?

the answer is yes, but see below.
 
> Also can anyone suggest good pointers for making use of frag_list in
> skb_shared_info structure? Is it meant to represent one network packet
> as the list of multiple skbs each skb holding part of packet data in
> the order they are linked?

frag_list can only be safely used in rare cases where you know that 
the ip defragmentation code will not be called.  It links multiple
skb's together to form one large packet (for receive)
 
> I tried finding it in UNDERSTANDING LINUX NETWORK INTERNALS by
> CHRISTIAN BENVENUTI, but couldn't find anything conclusive.  As I
> understand, it is enabled through NETIF_F_FRAGLIST feature of the
> device.

The Intel ixgbe, igb, and e1000e drivers all support receiving
packets into two buffers, the header into the first buffer and the
data into the first page, second page, etc.

the pages are stored in skb_shinfo(skb)->frags[]

for most working protocols in the kernel the ->data section is populated
if necessary by pskb_may_pull and friends

AFAIK the myri10ge driver receives only into pages and then has to
build a receivable sk_buff (using an open coded pskb_pull_tail)

hope this helps,
  Jesse--
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