From: Alexander Duyck <alexander.duyck@gmail.com>
To: saeed bishara <saeed.bishara@gmail.com>
Cc: Joseph Gasparakis <joseph.gasparakis@intel.com>,
davem@davemloft.net, shemminger@vyatta.com, chrisw@sous-sol.org,
gospo@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dmitry@broadcom.com,
bhutchings@solarflare.com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
Alexander Duyck <alexander.h.duyck@intel.com>
Subject: Re: [PATCH v4 1/5] net: Add support for hardware-offloaded encapsulation
Date: Mon, 10 Dec 2012 08:22:31 -0800 [thread overview]
Message-ID: <50C60C47.70102@gmail.com> (raw)
In-Reply-To: <CAMAG_ee6xW4EnzPFt=_5+NL2+LuyUjxd52Xc242inYm2+Yhg7g@mail.gmail.com>
On 12/10/2012 02:04 AM, saeed bishara wrote:
>> +static inline struct iphdr *inner_ip_hdr(const struct sk_buff *skb)
>> +{
>> + return (struct iphdr *)skb_inner_network_header(skb);
>> +}
> Hi,
> I'm a little bit bothered because of those inner_ functions, what
> about the following approach:
> 1. the skb will have a new state, that state can be outer (normal
> mode) and inner.
> 2. when you change the state to inner, all the helper functions such
> as ip_hdr will return the innter header.
>
> that's ofcourse the API side. the implementation may still use the
> fields you added to the skb.
>
> what you think?
> saeed
What you describe isn't too far off from what we are doing. However we
need to store both the inner and the outer headers. All these inner_
functions are meant to do is assist drivers to access the inner headers
in the case that skb->encapsulation is set. We wanted to avoid
abstracting it too much since it is possible in the future that both
inner and outer network headers may be needed if for instance you were
to place a tunnelled frame inside of a VLAN with hardware tag insertion.
Thanks,
Alex
next prev parent reply other threads:[~2012-12-10 16:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-08 0:14 [PATCH v4 net-next 0/5] tunneling: Add support for hardware-offloaded encapsulation Joseph Gasparakis
2012-12-08 0:14 ` [PATCH v4 1/5] net: " Joseph Gasparakis
2012-12-10 10:04 ` saeed bishara
2012-12-10 16:22 ` Alexander Duyck [this message]
2012-12-10 19:58 ` Dmitry Kravkov
2012-12-11 8:11 ` saeed bishara
2012-12-11 16:46 ` Alexander Duyck
2012-12-08 0:14 ` [PATCH v4 2/5] net: Handle encapsulated offloads before fragmentation or handing to lower dev Joseph Gasparakis
2012-12-08 0:14 ` [PATCH v4 3/5] vxlan: capture inner headers during encapsulation Joseph Gasparakis
2012-12-08 0:14 ` [PATCH v4 4/5] ixgbe: Adding tx encapsulation capability Joseph Gasparakis
2012-12-08 0:14 ` [PATCH v4 5/5] vxlan: Add capability of Rx checksum offload for inner packet Joseph Gasparakis
2012-12-09 5:21 ` [PATCH v4 net-next 0/5] tunneling: Add support for hardware-offloaded encapsulation 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=50C60C47.70102@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=bhutchings@solarflare.com \
--cc=chrisw@sous-sol.org \
--cc=davem@davemloft.net \
--cc=dmitry@broadcom.com \
--cc=gospo@redhat.com \
--cc=joseph.gasparakis@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=saeed.bishara@gmail.com \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).