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)



The following reply was made to PR kern/58124; it has been noted by GNATS.

From: Andrius V <vezhlys%gmail.com@localhost>
To: s ymgch <s.ymgch228%gmail.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost, 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 22:18:50 +0300

 On Mon, Apr 8, 2024 at 10:49=E2=80=AFAM s ymgch <s.ymgch228%gmail.com@localhost> wrot=
 e:
 >
 > Hi,
 >
 >
 > 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 =3D=3D 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 =3D IFM_AVALID;
 >         if (proto_oper !=3D 0) {
 >                 ifmr->ifm_status |=3D IFM_ACTIVE;
 > -               ifmr->ifm_active =3D IFM_ETHER | IFM_AUTO | media_oper;
 > -               /* txpause, rxpause, duplex? */
 > +               ifmr->ifm_active =3D IFM_ETHER | IFM_AUTO | IFM_FDX | med=
 ia_oper;
 > +               /* txpause, rxpause? */
 >         }
 >  }
 >
 > ----- patch -----
 >
 > -- Yamaguchi
 
 Hi,
 
 You are completely right! Setting the patch helps and lacp protocol
 starts to work. mcx0/mcx1 shows "media: Ethernet autoselect
 (10GBASE-CR1 full-duplex)" now, switch also shows mac address at the
 "LACP Partner System ID". Thank you for identifying the issue. Can the
 patch be applied directly, or more work needs to be done to identify
 when to set full-duplex mode?
 
 Regards,
 Andrius V
 


Home | Main Index | Thread Index | Old Index