Bug 273043 - ofed: GID not created when adding IP address to a VLAN interface
Summary: ofed: GID not created when adding IP address to a VLAN interface
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: Eric Joyner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-10 12:10 UTC by Rafal Michna
Modified: 2023-12-27 16:55 UTC (History)
3 users (show)

See Also:
linimon: mfc-stable13?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Michna 2023-08-10 12:10:54 UTC
Commit hash: 8a5c836b51ce, snapshot from August 3rd

When creating a VLAN interface, a GID is not created for IB devices, which prevents RDMA traffic through VLAN
This works fine on release branches, both 13.2 and 12.4

14.0:
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.5: IB/RoCE v1
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.4: IB/RoCE v1
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.3: IB/RoCE v1
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.2: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.1: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.0: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.2: ice0
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.1: ice0
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.0: ice0

13.2:
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.7: IB/RoCE v1
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.6: IB/RoCE v1
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.5: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.4: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.3: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.2: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.1: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.types.0: RoCE v2
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.5: vlan104
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.4: vlan104
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.3: vlan104
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.2: ice0
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.1: ice0
sys.class.infiniband.irdma-ice0.ports.1.gid_attrs.ndevs.0: ice0

Example VLAN configuration:

vlan104: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
        options=4600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG>
        ether 6c:fe:54:41:4a:70
        inet 104.0.0.87 netmask 0xffffff00 broadcast 104.0.0.255
        inet6 104::87 prefixlen 64
        inet6 fe80::6efe:54ff:fe41:4a70%vlan104 prefixlen 64 scopeid 0x6
        groups: vlan
        vlan: 104 vlanproto: 802.1q vlanpcp: 0 parent interface: ice0
        media: Ethernet autoselect (100GBase-CR4 <full-duplex>)
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>


MLX is also affected, so it's not a driver issue:

14.0:
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.3: RoCE v2
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.2: IB/RoCE v1
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.1: RoCE v2
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.0: IB/RoCE v1
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.5: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.4: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.3: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.2: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.1: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.0: mce0

13.2:
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.3: RoCE v2
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.2: IB/RoCE v1
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.1: RoCE v2
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.types.0: IB/RoCE v1
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.11: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.10: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.9: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.8: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.7: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.6: vlan204
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.5: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.4: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.3: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.2: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.1: mce0
sys.class.infiniband.mlx5_0.ports.1.gid_attrs.ndevs.0: mce0
Comment 1 Bartosz Sobczak 2023-08-11 09:28:00 UTC
I think i got the root cause for this issue.

Please take a look at this fix proposal:
https://reviews.freebsd.org/D41426
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-08-14 15:54:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8e6654a6a5511da87de03a91c527e1d7ad006c21

commit 8e6654a6a5511da87de03a91c527e1d7ad006c21
Author:     Bartosz Sobczak <bartosz.sobczak@intel.com>
AuthorDate: 2023-08-14 15:49:26 +0000
Commit:     Eric Joyner <erj@FreeBSD.org>
CommitDate: 2023-08-14 15:53:43 +0000

    ofed: fix roce gid insertion for vlan interfaces

    When attempting to use vlan interface the correct GID
    wasn't created due to incorrect ifp validation.

    The problem was introduced in
    3e142e07675b ('ofed: Mechanically convert to IfAPI)

    Signed-off-by: Bartosz Sobczak bartosz.sobczak@intel.com
    Signed-off-by: Eric Joyner <erj@FreeBSD.org>

    PR:             273043
    Sponsored by:   Intel Corporation
    Reviewed by:    jhibbits@, erj@
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D41426

 sys/ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Mateusz Moga 2023-08-23 09:01:01 UTC
issue is not present. please close
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2023-08-23 19:44:06 UTC
Assign to committer that resolved.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2023-12-27 16:55:28 UTC
^Triage: really, really, assign to committer that resolved.

Set flag for possible mfc-stable13.