[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191205140132.GD28269@lunn.ch>
Date: Thu, 5 Dec 2019 15:01:32 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Alexander Lobakin <alobakin@...nk.ru>
Cc: "David S. Miller" <davem@...emloft.net>,
Muciri Gatimu <muciri@...nmesh.com>,
Shashidhar Lakkavalli <shashidhar.lakkavalli@...nmesh.com>,
John Crispin <john@...ozen.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Stanislav Fomichev <sdf@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>,
Song Liu <songliubraving@...com>,
Alexei Starovoitov <ast@...nel.org>,
Matteo Croce <mcroce@...hat.com>,
Jakub Sitnicki <jakub@...udflare.com>,
Eric Dumazet <edumazet@...gle.com>,
Paul Blakey <paulb@...lanox.com>,
Yoshiki Komachi <komachi.yoshiki@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: fix flow dissection on Tx path
> Hi,
>
> > What i'm missing here is an explanation why the flow dissector is
> > called here if the protocol is already set? It suggests there is a
> > case when the protocol is not correctly set, and we do need to look
> > into the frame?
>
> If we have a device with multiple Tx queues, but XPS is not configured
> or system is running on uniprocessor system, then networking core code
> selects Tx queue depending on the flow to utilize as much Tx queues as
> possible but without breaking frames order.
> This selection happens in net/core/dev.c:skb_tx_hash() as:
>
> reciprocal_scale(skb_get_hash(skb), qcount)
>
> where 'qcount' is the total number of Tx queues on the network device.
>
> If skb has not been hashed prior to this line, then skb_get_hash() will
> call flow dissector to generate a new hash. That's why flow dissection
> can occur on Tx path.
Hi Alexander
So it looks like you are now skipping this hash. Which in your
testing, give better results, because the protocol is already set
correctly. But are there cases when the protocol is not set correctly?
We really do need to look into the frame?
How about when an outer header has just been removed? The frame was
received on a GRE tunnel, the GRE header has just been removed, and
now the frame is on its way out? Is the protocol still GRE, and we
should look into the frame to determine if it is IPv4, ARP etc?
Your patch looks to improve things for the cases you have tested, but
i'm wondering if there are other use cases where we really do need to
look into the frame? In which case, your fix is doing the wrong thing.
Should we be extending the tagger to handle the TX case as well as the
RX case?
Andrew
Powered by blists - more mailing lists