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)



On Mon, Apr 8, 2024 at 10:49 AM s ymgch <s.ymgch228%gmail.com@localhost> wrote:
>
> 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 == 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

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