[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMAG_ee6xW4EnzPFt=_5+NL2+LuyUjxd52Xc242inYm2+Yhg7g@mail.gmail.com>
Date: Mon, 10 Dec 2012 12:04:15 +0200
From: saeed bishara <saeed.bishara@...il.com>
To: Joseph Gasparakis <joseph.gasparakis@...el.com>
Cc: davem@...emloft.net, shemminger@...tta.com, chrisw@...s-sol.org,
gospo@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, dmitry@...adcom.com,
bhutchings@...arflare.com,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
Alexander Duyck <alexander.h.duyck@...el.com>
Subject: Re: [PATCH v4 1/5] net: Add support for hardware-offloaded encapsulation
> +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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists