From nobody Sun May 4 02:35:17 2025 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Zqpft0ptwz5v670 for ; Sun, 04 May 2025 02:35:34 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zqpfr2Kp1z3MYR for ; Sun, 04 May 2025 02:35:32 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of adrian.chadd@gmail.com designates 209.85.167.54 as permitted sender) smtp.mailfrom=adrian.chadd@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-54d6f93316dso1693837e87.2 for ; Sat, 03 May 2025 19:35:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746326129; x=1746930929; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/wZdMm7YmHMWGyzkDw7OZPuntqS0S6cQtbkvhNGglsQ=; b=M3yJDqlCKkgVs35gDQJJP7ye5HqL6Oawe/g/N5PAykVW3j+ZT02A8Lyz8LeqYTfjt0 Z4YD331poqdQDoW6kvQyJNYjSwMurTDZ1WtsROoAAJ5aw2h0nU2Uq0jaAJghvp2jilqQ qZxiJh4O2nLCchpntEJMz0ii2syJXX38EfooQBHxn+Cc2smdemP8zB5/9MLF5J0RxLXG BhRSIzq0je3UX3TpyvmG1qwzpgi+sdJfsL42cYV9ECzbspVXytpFHWOl9hlJN4+3iP1f jsUmnpiIAth7a4mU6bnM7J9EvK6VgkB3xplqxIOf2Q7kGHiCXA9Lz/d1ilBju3XRX0it fFzQ== X-Gm-Message-State: AOJu0YxzPPsXwdpbmN+sKNMDibLQJtIPUKFudIuO0+bWTKcpYAqz1XSP 2M/fSCZTf7KZ3QqF6IQ6rPnS/GkH8xu8/fh436BVWze8L28mPzlW030UBt+8dQBB54aAbOLOsJe cbgBRtR3pBGef8Z7v54la02aA+PKcordb X-Gm-Gg: ASbGncu57vOscR5/kwin9DgQzR49Ghd/z7LRy7EFuQNoLewioEz6TCtUTanQr+PZW1G ZSHoPnhWIRow0ER1PqLZYZNUQ7qzAL4oNdaIopeO5dC3lllwafTN+EXwUSRpZ4z4VWCoKVAFQ3q xg4vTWSbzOz4WBTMTmMvg6YelmeV8/n3uzqg== X-Google-Smtp-Source: AGHT+IHWP646mCieJiqObzpLjNHxI2DV3PF8yX2jAnIwavKJ7fiJdrCb1tabCs9QICfA+n3qDVlHVJ1vTgVPRPsZUuU= X-Received: by 2002:a05:6512:3d05:b0:54e:a309:bf3f with SMTP id 2adb3069b0e04-54fa4f9a5a0mr640817e87.57.1746326128911; Sat, 03 May 2025 19:35:28 -0700 (PDT) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Adrian Chadd Date: Sat, 3 May 2025 19:35:17 -0700 X-Gm-Features: ATxdqUGKkC6wUMfTufp0Wm7xpazi_0OBY3wTJU-oSjBNsuy2INmkQtxSGrjzsAw Message-ID: Subject: Re: ixgbe, mdio, and marvell ethernet switches To: freebsd-net@freebsd.org Content-Type: multipart/alternative; boundary="000000000000936ffa0634463cdc" X-Rspamd-Queue-Id: 4Zqpfr2Kp1z3MYR X-Spamd-Bar: / X-Spamd-Result: default: False [-0.73 / 15.00]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-0.93)[-0.934]; NEURAL_HAM_MEDIUM(-0.89)[-0.894]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.54:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.54:from] --000000000000936ffa0634463cdc Content-Type: text/plain; charset="UTF-8" Hi! Update! On Sun, 27 Apr 2025 at 21:00, Adrian Chadd wrote: > A few weeks ago I started poking at some netgate hardware to use as > freebsd wifi test boxes in my little test lab here. The two I'm using are > ADI (now Silicom) boxes that needed some fun deep dives into BIOS versions, > interrupt storms and compatible mini-PCIe cards (some just don't actually > get probed!) > > [snip] > > Anyway, on the etherswitch side I did a bunch of cleanup to support > etherswitch/miiproxy/e6000sw as modules, and fix a bunch of e6000sw bugs, > and they're in -HEAD: > > * https://reviews.freebsd.org/D50024 to https://reviews.freebsd.org/D50031 > are all cleanups > * https://reviews.freebsd.org/D50044 adds the 88E6190X support > Those are in -HEAD now! > > But then the next fun problem - none of the ports came up. Well, I lie. > Only one of them came up. I went digging into the PHY registers and found > that the marvell gige PHY code didn't actually power up the PHY if it was > powered down, so I fixed that too: > > * https://reviews.freebsd.org/D50045 > This is in -HEAD now! > > Then with some hints, I could see and use all of the switch ports on the > AT&T ATT-150 CPE device: > > hint.mdio.0.at="ix0" > hint.e6000sw.0.addr="0x10" > hint.e6000sw.0.port0disabled="1" > hint.e6000sw.0.is6190x=1 > hint.e6000sw.0.port9cpu=1 > hint.e6000sw.0.port10cpu=1 > hint.e6000sw.0.port9speed=2500 > hint.e6000sw.0.port10speed=2500 > > Then, I also acquired a wireguard M270 box, as it also apprently has a > marvell switch attached to an X553 backplane, and none of the ethernet > ports work at all out of the box. > The above hints worked on that too - with addr set to "0x0" instead of > "0x10". > > So, now i have two Atom C3558 boxes w/ X553 2.5gbit backplane ports hooked > into an 8 port marvell gige switch working on -HEAD (save the ixgbe mdio > diff that I attached; I'll sort that out soon). All it took was like $250 > in hardware, staring at intel documentation and linux/dpdk driver code, and > three evenings thinking to myself "surely this can't be THAT hard. > https://reviews.freebsd.org/D50127 adds MDIO/MII support for the x553 bits if there's an external PHY for some reason, and https://reviews.freebsd.org/D50128 adds the if_ix MDIO bus. It's all preliminary, but it works, and if for some reason I forget to land it / get distracted by real life, all of the moving pieces are now available and public. I'm hoping to clean up D50128 enough next week to get it into -HEAD (with the intel maintainers blessings of course) and then add some wiki documentation for the two switch platforms I have that use it. I hear there's some netgate boxes that also use this switch but I don't have the hardware to play with. -adrian --000000000000936ffa0634463cdc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi! Update!

On Sun, = 27 Apr 2025 at 21:00, Adrian Chadd <adrian@freebsd.org> wrote:
A few weeks ago I started poking = at some netgate hardware to use as freebsd wifi test boxes in my little tes= t lab here. The two I'm using are ADI (now Silicom) boxes that needed s= ome fun deep dives into BIOS versions, interrupt storms and compatible mini= -PCIe cards (some just don't actually get probed!)

=
[snip]
=C2=A0

Anyway, on the etherswitch side I did a bunch of cleanup to support e= therswitch/miiproxy/e6000sw as modules, and fix a bunch of e6000sw bugs, an= d they're in -HEAD:

* https://reviews.f= reebsd.org/D50044 adds the 88E6190X support

Those are in -HEAD now!

But then the= next fun problem - none of the ports came up. Well, I lie. Only one of the= m came up. I went digging into the PHY registers and found that the marvell= gige PHY code didn't actually power up the PHY if it was powered down,= so I fixed that too:


<= div>=C2=A0


hint.mdio.0.at= =3D"ix0"
hint.e6000sw.0.addr=3D"0x10"
= hint.e6000sw.0.port0disabled=3D"1"
hint.e6000sw.0.is619= 0x=3D1
hint.e6000sw.0.port9cpu=3D1
hint.e6000sw.0.port10cpu=3D1
hi= nt.e6000sw.0.port9speed=3D2500
hint.e6000sw.0.port10speed=3D2500

Then, I also acquired a wireguard M270 box, as it also ap= prently has a marvell switch attached to an X553 backplane, and none of the= ethernet ports work at all out of the box.
The above hints worke= d on that too - with addr set to "0x0" instead of "0x10"= ;.

So, now i have two Atom C3558 boxes w/ X553 2.5= gbit backplane ports hooked into an 8 port marvell gige switch working on -= HEAD (save the ixgbe mdio diff that I attached; I'll sort that out soon= ). All it took was like $250 in hardware, staring at intel documentation an= d linux/dpdk driver code, and three evenings thinking to myself "surel= y this can't be THAT hard.

= https://reviews.freebsd.org/= D50127 adds MDIO/MII support for the x553 bits if there's an extern= al PHY for some reason, and=C2=A0https://reviews.freebsd.org/D50128 adds the if_ix MDIO bus. It'= ;s all preliminary, but it works, and if for some reason I forget to land i= t / get distracted by real life, all of the moving pieces are now available= and public.

I'm hoping to clean up D50128 eno= ugh next week to get it into -HEAD (with the intel maintainers blessings of= course) and then add some wiki documentation for the two switch platforms = I have that use it. I hear there's some netgate boxes that also use thi= s switch but I don't have the hardware to play with.

-adrian
=C2=A0
--000000000000936ffa0634463cdc--