From: Jason Gunthorpe <jgg@nvidia.com>
To: Martin Wilck <mwilck@suse.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Leon Romanovsky <leon@kernel.org>,
"Mohammad Heib" <goody698@gmail.com>
Subject: Re: Revert "RDMA/rxe: Remove VLAN code leftovers from RXE"
Date: Wed, 20 Jan 2021 11:19:20 -0400 [thread overview]
Message-ID: <20210120151920.GT4147@nvidia.com> (raw)
In-Reply-To: <3c3c52c5a19beb1a22c0b51af8fd14297187e82c.camel@suse.com>
On Wed, Jan 20, 2021 at 04:04:44PM +0100, Martin Wilck wrote:
> Anyway, Jason seems to agree with you that the way it worked until
> 5.10, which was fine as far as I could tell, was wrong. I'd still
> appreciate some hints explaining what exactly was wrong with the old
> code, and how you guys reckon it should work instead. In particular
> considering Mohammad's statement I quoted further down. Was Mohammad
> wrong?
In RDMA vlan support revolves around the gid_attr
To have vlan support the device must copy the vlan from the gid_attrs
associated with every tx packet, and match the gid_attr table on every
rx, including the vlan.
For instance, rxe never calls rdma_read_gid_l2_fields to get the
gid_attr for tx, so it doesn't support vlan, at all.
> What I got so far didn't help me much. I'd especially like to
> understand how you think the high-level user experience should be.
A single rxe device created on the physical netdev. The core code gid
table stuff should import vlan entries of upper vlan net devices and
the general machinery should select those gid table entries when a
vlan is required.
rxe should not be creatable on upper vlan net devices to emulate how
real HW works.
If your use case that work was creating a rxe on a upper vlan device
and relying on the tx of vlan layer to stuff the vlan, then the
problem is how the core code manages the gid table.
Since VLAN is not supported at all in rxe, in that situation the core
code should be filling gid_attrs from the upper vlan netdev only, and
those gid_attrs should have vlan_id set to 0xFFFF.
Then the ib_init_ah_attr_from_wc() will properly match gid table
entries for incoming packets.
There may be other things wrong with the core code because it was
never tested on this situation..
Jason
next prev parent reply other threads:[~2021-01-20 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 5:33 Revert "RDMA/rxe: Remove VLAN code leftovers from RXE" Zhu Yanjun
2021-01-20 14:30 ` Martin Wilck
2021-01-20 14:44 ` Zhu Yanjun
2021-01-20 15:04 ` Martin Wilck
2021-01-20 15:19 ` Jason Gunthorpe [this message]
2021-01-20 15:28 ` Martin Wilck
2021-01-20 15:45 ` Jason Gunthorpe
2021-01-20 16:18 ` Martin Wilck
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=20210120151920.GT4147@nvidia.com \
--to=jgg@nvidia.com \
--cc=goody698@gmail.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mwilck@suse.com \
--cc=zyjzyj2000@gmail.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.