From: Eric Dumazet <eric.dumazet@gmail.com>
To: Changli Gao <xiaosuo@gmail.com>
Cc: Jamal Hadi Salim <hadi@cyberus.ca>,
"David S. Miller" <davem@davemloft.net>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Tom Herbert <therbert@google.com>, Jiri Pirko <jpirko@redhat.com>,
netdev@vger.kernel.org, netem@lists.linux-foundation.org
Subject: Re: [PATCH 5/5 v2] net: add old_queue_mapping into skb->cb
Date: Wed, 15 Dec 2010 08:13:22 +0100 [thread overview]
Message-ID: <1292397202.2377.13.camel@edumazet-laptop> (raw)
In-Reply-To: <1292390636-3156-1-git-send-email-xiaosuo@gmail.com>
Le mercredi 15 décembre 2010 à 13:23 +0800, Changli Gao a écrit :
> For the skbs returned from ifb, we should use the queue_mapping
> saved before ifb.
>
> We save old queue_mapping in old_queue_mapping just before calling
> dev_queue_xmit, and restore the old_queue_mapping to queue_mapping
> just before reinjecting the skb.
>
> dev_pick_tx() use the current queue_mapping for the skbs reinjected
> by ifb.
>
> A new struct dev_skb_cb is added, and valid in qdisc and gso layer.
> The original qdisc_skb_cb and DEV_GSO_CB are placed after dev_skb_cb.
>
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
This is really ugly and error prone.
Could you just use a more normal way to express this ?
struct ifb_save_fields_cb {
u16 queue_mapping;
};
struct napi_gro_cb {
struct ifb_save_fields_cb ifb_cb; /* needed by ifb, must be first */
...
}
struct qdisc_skb_cb {
struct ifb_save_fields_cb ifb_cb; /* needed by ifb, must be first */
unsigned int pkt_len;
};
next prev parent reply other threads:[~2010-12-15 7:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 5:23 [PATCH 5/5 v2] net: add old_queue_mapping into skb->cb Changli Gao
2010-12-15 7:13 ` Eric Dumazet [this message]
2010-12-15 7:41 ` Changli Gao
2010-12-15 8:39 ` |PATCH net-next-2.6] ifb: use netif_receive_skb() instead of netif_rx() Eric Dumazet
2010-12-15 8:51 ` Changli Gao
2010-12-15 12:49 ` jamal
2010-12-15 14:21 ` Eric Dumazet
2010-12-17 12:55 ` jamal
2010-12-15 16:14 ` Stephen Hemminger
2010-12-15 16:19 ` [PATCH 5/5 v2] net: add old_queue_mapping into skb->cb Stephen Hemminger
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=1292397202.2377.13.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=netem@lists.linux-foundation.org \
--cc=shemminger@linux-foundation.org \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.com \
/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