netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: [PATCH 0/4] net: define accessors to get/set skb->dst and skb->rtable
Date: Tue, 02 Jun 2009 17:12:13 +0200	[thread overview]
Message-ID: <4A25414D.6040605@gmail.com> (raw)

David

Here are patches I originally cooked to review all places that could need skb->dst

I believe they could be applied in net-next-2.6 because we could then
implement what we discussed in last december, about avoiding
refcounting on dst_entries in input path (thread about IP_PKTINFO stuff,
and a patch we had to revert)

You suggested to use the low order bit of skb->dst to tell if we got a
refcount or not.

These four patches implement grounding for this idea (no functional changes yet)

Next step is adding the low order bit handling (or another bit if it happens
to be too expensive to check this bit each time we want skb->dst, we
still have to benchmark this)


First patchs adds _skb_dst opaque field in existing union

Second patch removes skb->rtable field and implements skb_rtable() method :

struct rtable *skb_rtable(const struct sk_buff *skb)

Third patch removes skb->dst field and implements several methods :

struct dst_entry *skb_dst(const struct sk_buff *skb)
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
void skb_dst_drop(struct sk_buff *skb)
(skb_dst_drop() is not yet necessary but prepares next patches)

Fourth patch is a cleanup, avoiding the mono-field anonymous union.

Thank you



             reply	other threads:[~2009-06-02 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 15:12 Eric Dumazet [this message]
2009-06-03 10:35 ` [PATCH 0/4] net: define accessors to get/set skb->dst and skb->rtable 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=4A25414D.6040605@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --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).