netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexander.h.duyck@intel.com
Cc: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com,
	bruce.w.allan@intel.com, netdev@vger.kernel.org
Subject: Re: ixgbe: normalize frag_list usage
Date: Wed, 13 Oct 2010 19:17:02 -0700 (PDT)	[thread overview]
Message-ID: <20101013.191702.71129064.davem@davemloft.net> (raw)
In-Reply-To: <4CAE2692.8020401@intel.com>

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Thu, 07 Oct 2010 12:59:14 -0700

> I can track it in the RSC_CB if that works for you.  Right now though
> I guess I am not seeing the difference between tracking this in
> skb->frag_next vs IXGBE_RSC_CB(skb)->frag_head.  I think it might help
> if you were to provide some functions that demonstrate exactly what
> you had in mind for frag list handling.  Specifically if you were to
> add a function for merging a frag into the frag list, and for how you
> want to approach cleaning up the skb->prev/frag_tail_tracker pointer
> when you are cleaning up an active frag_list.

Basically the one helper function will look like this.

static inline void skb_frag_list_add(struct sk_buff *head,
				     struct sk_buff *new)
{
	if (!skb_shinfo(skb)->frag_list) {
		skb_shinfo(skb)->frag_list = new;
		skb->frag_list_tail = new;
	} else {
		skb->frag_list_tail->frag_list_next = new;
		skb->frag_list_tail = new;
	}
}

If you have to track the head from the tail packets, please do
so in a private control block.

  reply	other threads:[~2010-10-14  2:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04  6:54 ixgbe: normalize frag_list usage David Miller
2010-10-04 15:37 ` Rose, Gregory V
2010-10-04 18:04 ` Alexander Duyck
2010-10-04 18:32   ` David Miller
2010-10-04 19:49     ` Alexander Duyck
2010-10-05 22:45     ` Duyck, Alexander H
2010-10-06  3:08       ` David Miller
2010-10-07  6:58       ` David Miller
2010-10-07 19:59         ` Alexander Duyck
2010-10-14  2:17           ` David Miller [this message]
2010-10-08 23:57         ` [RFC] ixgbe: v3 " Duyck, Alexander H
2010-10-25 19:47           ` David Miller

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=20101013.191702.71129064.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexander.h.duyck@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.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).