netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Edward Cree <ecree@solarflare.com>
Cc: matvejchikov@gmail.com, netdev@vger.kernel.org, Aleksey.Baulin@gmail.com
Subject: Re: A couple of questions about the SKB fragments
Date: Thu, 5 May 2016 08:58:29 -0400	[thread overview]
Message-ID: <20160505125829.GA26978@oracle.com> (raw)
In-Reply-To: <572B2AEE.1020802@solarflare.com>

On (05/05/16 12:13), Edward Cree wrote:
> On 05/05/16 08:40, Ilya Matveychikov wrote:
> >
> > While working with fragmented SKBs we've got stuck with the following:
> > - is it possible for an SKB fragment in skb_shinfo(skb)->frag_list to
> > be fragmented too (i.e. to have SKBs in frag_list)?
> > - do skb->len and skb->data_len contain the whole SKB length,
> > including the length of all fragments (not only the paged parts)?
> >
> > Is there any docs except the kernel sources itself to refer to?
> davem has some docs up at http://vger.kernel.org/~davem/skb.html and
> http://vger.kernel.org/~davem/skb_data.html
> In particular note the following:
> "The frag_list is used to maintain a chain of SKBs organized for
>  fragmentation purposes, it is _not_ used for maintaining paged data."
> So my reading would suggest there is no way to multiple-layer-fragment
> an SKB; the frags are page pointers and offsets, not entire sk_buff
> structs in their own right.

Actually (and perhaps I am mixing up skb_frag_t with the sk_buff in
skb_shinfo(skb)->frag_list) I think it is entirely possible in theory 
for the frag_list to itself both skb_frag_t's as well as more sk_buffs
in the ->frag_list- at least that's why I understand fromcode
that recurses using skb_walk_frags(), such as tcp_md5_hash_skb_data().
AIUI, the statement about page pointers and offsets applies to the 
skb_frag_t's in the skb_shared_info. The len and data_len should be
the sum-total for the whole skb, including skb_frag_t's and ->frag_list.

--Sowmini

  reply	other threads:[~2016-05-05 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-05  7:40 A couple of questions about the SKB fragments Ilya Matveychikov
2016-05-05 11:13 ` Edward Cree
2016-05-05 12:58   ` Sowmini Varadhan [this message]
2016-05-07  9:21   ` Ilya Matveychikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160505125829.GA26978@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=Aleksey.Baulin@gmail.com \
    --cc=ecree@solarflare.com \
    --cc=matvejchikov@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).