All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Ido Schimmel <idosch@mellanox.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	netdev <netdev@vger.kernel.org>
Subject: Re: switchdev offload & ecmp
Date: Tue, 16 May 2017 14:57:47 +0200	[thread overview]
Message-ID: <4c70d1fc-ba11-e358-2142-d373f44cb5a1@6wind.com> (raw)
In-Reply-To: <20170515164036.GA5669@splinter.mtl.com>

Le 15/05/2017 à 18:40, Ido Schimmel a écrit :
[snip]
>> Is there a consistency between the ecmp algorithm of the kernel and the one from
>> spectrum?
> 
> We currently use the hardware's defaults for ECMP hashing, which include
> both L3 and L4 fields. I'm aware of Nik's patch, but we've yet to
> reflect that. Note that the L4 fields aren't considered for fragmented
> packets.
Ok.

> 
>> I suspect that there can be scenarii where some packets of a flow are forwarded
>> by the driver and some other are forwarded by the kernel.
> 
> Can you elaborate? The kernel only sees specific packets, which were
> trapped to the CPU. See:
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/tree/drivers/net/ethernet/mellanox/mlxsw/spectrum.c#n2996
Ok, this part was not clear for me, thank you for the pointer.

So, when an arp resolution is needed, the packets are not trapped to the CPU,
the device manages the queue itself?

> 
>> For example, an ecmp route with two nexthops: a connected route and a gw? 
> 
> Not sure I'm following you. A packet will either hit a remote route or a
> directly connected one. We distinguish between the two based on the
> scope of the first nexthop in the group. See:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c#n2043
> 
>> In that case, the periodic nexthops update
>> (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c#n987)
>> won't help. How do you ensure that all packets of the flow are always forwarded
>> through the same nexthop?
> 
> I don't think we can ensure that for a flow in which some packets are
> forwarded by the kernel and some by the device, but I failed to
> understand your example of such a flow.
I was trying to understand if nexthop choice is always the same in the kernel
and in the device. And I was also trying to understand if it's possible to have
some packets of a flow routed by the kernel and some others by the device.


Thank you for the answers,
Nicolas

  reply	other threads:[~2017-05-16 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 14:25 switchdev offload & ecmp Nicolas Dichtel
2017-05-15 16:40 ` Ido Schimmel
2017-05-16 12:57   ` Nicolas Dichtel [this message]
2017-05-16 14:11     ` Ido Schimmel
2017-05-16 20:22       ` Nicolas Dichtel

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=4c70d1fc-ba11-e358-2142-d373f44cb5a1@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.