NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/58124: lagg(4) fails to work with lacp protocol on mcx(4)



Hi,

On Mon, Apr 8, 2024 at 3:25 PM Andrius V <vezhlys%gmail.com@localhost> wrote:
>
> The following reply was made to PR kern/58124; it has been noted by GNATS.
>
> From: Andrius V <vezhlys%gmail.com@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: yamaguchi%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
> Subject: Re: kern/58124: lagg(4) fails to work with lacp protocol on mcx(4)
> Date: Mon, 8 Apr 2024 09:23:12 +0300
>
>  On Mon, Apr 8, 2024 at 4:30=E2=80=AFAM s ymgch <s.ymgch228%gmail.com@localhost> wrote=
>  :
>  >
>  > The following reply was made to PR kern/58124; it has been noted by GNATS=
>  .
>  >
>  > From: s ymgch <s.ymgch228%gmail.com@localhost>
>  > To: gnats-bugs%netbsd.org@localhost
>  > Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs@netbs=
>  d.org
>  > Subject: Re: kern/58124: lagg(4) fails to work with lacp protocol on mcx(=
>  4)
>  > Date: Mon, 8 Apr 2024 10:24:55 +0900
>  >
>  >  Hi,
>  >
>  >  Could you check "ifconfig -m mcx0" and "ifconfig -m mcx1"?
>  >  LACP in lagg(4) needs "mediaopt full-duplex" to work, but mcx(4) may
>  >  be missing IFM_FDX.
>  >
>
>  Hi,
>
>  supported media support is reported as:
>          media 1000BASE-SGMII
>          media 1000BASE-KX
>          media 10GBASE-KR
>          media 10GBASE-CR1
>          media 10GbaseSR
>          media 10GbaseLR
>          media 1000baseT
>          media autoselect
>

It seems that the media of mcx(4) does not set full-duplex.
Could you test the following patch?

----- patch -----
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 274682e430af..8094e9b11320 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -8031,7 +8031,7 @@ mcx_media_add_types(struct mcx_softc *sc)
                if (cap->cap_media == 0)
                        continue;

-               ifmedia_add(&sc->sc_media, IFM_ETHER | cap->cap_media, 0, NULL);
+               ifmedia_add(&sc->sc_media, IFM_ETHER | IFM_FDX |
cap->cap_media, 0, NULL);
        }
 }

@@ -8072,8 +8072,8 @@ mcx_media_status(struct ifnet *ifp, struct
ifmediareq *ifmr)
        ifmr->ifm_status = IFM_AVALID;
        if (proto_oper != 0) {
                ifmr->ifm_status |= IFM_ACTIVE;
-               ifmr->ifm_active = IFM_ETHER | IFM_AUTO | media_oper;
-               /* txpause, rxpause, duplex? */
+               ifmr->ifm_active = IFM_ETHER | IFM_AUTO | IFM_FDX | media_oper;
+               /* txpause, rxpause? */
        }
 }

----- patch -----

-- Yamaguchi


Home | Main Index | Thread Index | Old Index