Revert "RDMA/rxe: Remove VLAN code leftovers from RXE"
authorMartin Wilck <mwilck@suse.com>
Wed, 20 Jan 2021 16:19:13 +0000 (17:19 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 20 Jan 2021 17:29:28 +0000 (13:29 -0400)
commitf1b0a8ea9f12b8ade0dbe40dd57e4ffa9a30ed93
tree6a08f3df32ca3d0cf399b0debcb304e9929fad42
parentf068cb1db2cb40c9782874df7b08c684106cf609
Revert "RDMA/rxe: Remove VLAN code leftovers from RXE"

This reverts commit b2d2440430c0fdd5e0cad3efd6d1c9e3d3d02e5b.

It's true that creating rxe on top of 802.1q interfaces doesn't work.
Thus, commit fd49ddaf7e26 ("RDMA/rxe: prevent rxe creation on top of vlan
interface") was absolutely correct.

But b2d2440430c0 was incorrect assuming that with this change, RDMA and
VLAN don't work togehter at all. It just has to be set up
differently. Rather than creating rxe on top of the VLAN interface, rxe
must be created on top of the physical interface.  RDMA then works just
fine through VLAN interfaces on top of that physical interface, via the
"upper device" logic.

This is hard to see in the rxe logic because it never talks about vlan,
but instead rxe carefully selects upper vlan netdevices when working with
packets which in turn imply certain vlan tagging. This is all done
correctly and interacts with the gid table with VLAN support the same as
real HW does.

b2d2440430c0 broke this setup deliberately and should thus be
reverted. Also, b2d2440430c0 removed rxe_dma_device(), so adapt the revert
to discard that hunk.

Fixes: b2d2440430c0 ("RDMA/rxe: Remove VLAN code leftovers from RXE")
Link: https://lore.kernel.org/r/20210120161913.7347-1-mwilck@suse.com
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_net.c
drivers/infiniband/sw/rxe/rxe_resp.c