From: "Singhai, Anjali" <anjali.singhai@intel.com>
To: Jesse Gross <jesse@kernel.org>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
jeffrey.t.kirsher@intel.org, Kiran Patil <kiran.patil@intel.com>,
Tom Herbert <tom@herbertland.com>
Subject: Re: [PATCH v3 2/4] i40e: geneve tunnel offload support
Date: Tue, 8 Dec 2015 15:08:22 -0800 [thread overview]
Message-ID: <566762E6.7050505@intel.com> (raw)
In-Reply-To: <CAEh+42jr+8Q65Zp0A+NE3jZSBe5nvnbaT6Zpx_JUHG0=MOUVhw@mail.gmail.com>
On 12/8/2015 10:36 AM, Jesse Gross wrote:
> On Tue, Dec 8, 2015 at 10:20 AM, Alexei Starovoitov
> <alexei.starovoitov@gmail.com> wrote:
>> On Tue, Dec 08, 2015 at 10:12:12AM -0800, Anjali Singhai Jain wrote:
>>> +/**
>>> + * i40e_add_geneve_port - Get notifications about GENEVE ports that come up
>>> + * @netdev: This physical port's netdev
>>> + * @sa_family: Socket Family that GENEVE is notifying us about
>>> + * @port: New UDP port number that GENEVE started listening to
>>> + **/
>>> +static void i40e_add_geneve_port(struct net_device *netdev,
>>> + sa_family_t sa_family, __be16 port)
>>> +{
>>> +#if IS_ENABLED(CONFIG_GENEVE)
>> ...
>>> + /* New port: add it and mark its index in the bitmap */
>>> + pf->udp_ports[next_idx].index = port;
>>> + pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_NGE;
>> the function suppose to deal with geneve but tunnel type is NGE ?!
> NGE is an old name for Geneve: "Next Generation Encapsulation"
Yes and that is why the old name in the SW/FW header files.
>>> -#define I40E_MAX_TUNNEL_HDR_LEN 80
>>> +/* Hardware supports L4 tunnel length of 128B (=2^7) which includes
>>> + * inner mac plus all inner ethertypes.
>>> + */
>>> +#define I40E_MAX_TUNNEL_HDR_LEN 128
>> so the driver lied about actual hw capabilities earlier
>> or it needs firmware update to work this way?
> I'm pretty sure that this is just making the calculation match the
> hardware more accurately. If you look at the code below it, it is now
> calculating the length from a different place.
It is making the code match the HW more accurately, which did support
the 128 size
all along but till we enabled geneve support in the SW and FW, the
earlier setting was the right value.
>
>>> - if (!(tx_flags & I40E_TX_FLAGS_VXLAN_TUNNEL)) {
>>> + if (!(tx_flags & I40E_TX_FLAGS_UDP_TUNNEL)) {
>> ...
>>> @@ -163,7 +163,7 @@ enum i40e_dyn_idx_t {
>>> #define I40E_TX_FLAGS_FSO BIT(7)
>>> #define I40E_TX_FLAGS_TSYN BIT(8)
>>> #define I40E_TX_FLAGS_FD_SB BIT(9)
>>> -#define I40E_TX_FLAGS_VXLAN_TUNNEL BIT(10)
>>> +#define I40E_TX_FLAGS_UDP_TUNNEL BIT(10)
>> these changes implying that HW actually doesn't have special 'geneve or vxlan'
>> hard coded logic and it's generic enough to understand most of udp tunnels.
>> Then why you cannot generalize this whole things as generic udp tunnel offload
>> and do not add any protocol specific hooks and ndos.
> These are transmit flags but the issue of specialization relates to receive.
Second what Jesse said.
next prev parent reply other threads:[~2015-12-08 23:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 18:12 Add support for Geneve udp port offload Anjali Singhai Jain
2015-12-08 18:12 ` [PATCH v3 1/4] geneve: Add geneve udp port offload for ethernet devices Anjali Singhai Jain
2015-12-12 0:58 ` David Miller
2015-12-12 3:11 ` Tom Herbert
2015-12-14 16:03 ` Singhai, Anjali
2015-12-08 18:12 ` [PATCH v3 2/4] i40e: geneve tunnel offload support Anjali Singhai Jain
2015-12-08 18:20 ` Alexei Starovoitov
2015-12-08 18:36 ` Jesse Gross
2015-12-08 23:08 ` Singhai, Anjali [this message]
2015-12-08 18:22 ` John W. Linville
2015-12-11 5:44 ` Jeff Kirsher
2015-12-08 18:12 ` [PATCH v3 3/4] i40e: Kernel dependency update for i40e to support geneve offload Anjali Singhai Jain
2015-12-11 5:45 ` Jeff Kirsher
2015-12-08 18:12 ` [PATCH v3 4/4] geneve: Add geneve_get_rx_port support Anjali Singhai Jain
2015-12-12 1:00 ` 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=566762E6.7050505@intel.com \
--to=anjali.singhai@intel.com \
--cc=alexei.starovoitov@gmail.com \
--cc=jeffrey.t.kirsher@intel.org \
--cc=jesse@kernel.org \
--cc=kiran.patil@intel.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).