ADMtec aue interface does not work with full 1500 VLAN_MTU

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ADMtec aue interface does not work with full 1500 VLAN_MTU

Christopher Zimmermann-2
Hi,

I own this old USB ethernet controller:

aue0 at uhub9 port 5 configuration 1 interface 0 "ADMtek USB To LAN Converter" rev 2.00/1.01 addr 4
aue0: address 00:05:1b:b2:96:02
ukphy0 at aue0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x000749, model 0x0001

This works:

doas ifconfig vlan67 mtu 1496

this doesn't:

doas ifconfig vlan67 mtu 1497


Should we therefore disable VLAN_MTU on this chipset?


Christopher



Index: if_aue.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_aue.c,v
retrieving revision 1.109
diff -u -p -r1.109 if_aue.c
--- if_aue.c 2 Oct 2018 19:49:10 -0000 1.109
+++ if_aue.c 4 Jul 2019 18:25:06 -0000
@@ -781,8 +781,6 @@ aue_attach(struct device *parent, struct
  ifp->if_watchdog = aue_watchdog;
  strlcpy(ifp->if_xname, sc->aue_dev.dv_xname, IFNAMSIZ);
 
- ifp->if_capabilities = IFCAP_VLAN_MTU;
-
  /* Initialize MII/media info. */
  mii = &sc->aue_mii;
  mii->mii_ifp = ifp;


--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue interface does not work with full 1500 VLAN_MTU

Chris Cappuccio
Christopher Zimmermann [[hidden email]] wrote:

> This works:
>
> doas ifconfig vlan67 mtu 1496
>
> this doesn't:
>
> doas ifconfig vlan67 mtu 1497
>
>
> Should we therefore disable VLAN_MTU on this chipset?
>
> - ifp->if_capabilities = IFCAP_VLAN_MTU;
> -


Yes absolutely. If IFCAP_VLAN_MTU actually worked for some chip versions,
more work is needed to distinguish the working chipsets.

Chris

Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

Christopher Zimmermann-2
On Sun, Jul 07, 2019 at 01:26:55PM -0700, Chris Cappuccio wrote:

>Christopher Zimmermann [[hidden email]] wrote:
>> This works:
>>
>> doas ifconfig vlan67 mtu 1496
>>
>> this doesn't:
>>
>> doas ifconfig vlan67 mtu 1497
>>
>>
>> Should we therefore disable VLAN_MTU on this chipset?
>>
>> - ifp->if_capabilities = IFCAP_VLAN_MTU;
>> -
>
>
>Yes absolutely. If IFCAP_VLAN_MTU actually worked for some chip versions,
>more work is needed to distinguish the working chipsets.

Hi,

I'm looking for reponts of aue(4) chipsets actually supporting VLAN_MTU.
Mine does not. It identifies as:

aue0 at uhub9 port 5 configuration 1 interface 0 "ADMtek USB To LAN Converter" rev 2.00/1.01 addr 5
aue0: address 00:05:1b:b2:96:02
ukphy0 at aue0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI 0x000749, model 0x0001

In case there are none, I would like to drop above mentioned
IFCAP_VLAN_MTU flag for the aue(4) driver and look for OKs.


Christopher


--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1

Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

Tom Smyth
Hi Chrisz,

4 bytes for the vlan header .. have you tried increasing the parent
intetface mtu by 4bytes

So for vlan of 1500 mtu  set parent interface mtu to 1504 bytes

If you are doing q in q vlan nesting

Then the parent interface should be 1500bytes +4× number of levels of
nesting eg 1 vlan nested inside another vlan (2 levels ov vlans

1500+(4×2) for parent physical interface
The first ( outer vlan should be 1500+4 bytes mtu)
Innerclan can be 1500 mtu
Hope this helps





On Tuesday, 21 April 2020, Christopher Zimmermann <[hidden email]>
wrote:

> On Sun, Jul 07, 2019 at 01:26:55PM -0700, Chris Cappuccio wrote:
>
>> Christopher Zimmermann [[hidden email]] wrote:
>>
>>> This works:
>>>
>>> doas ifconfig vlan67 mtu 1496
>>>
>>> this doesn't:
>>>
>>> doas ifconfig vlan67 mtu 1497
>>>
>>>
>>> Should we therefore disable VLAN_MTU on this chipset?
>>>
>>> -       ifp->if_capabilities = IFCAP_VLAN_MTU;
>>> -
>>>
>>
>>
>> Yes absolutely. If IFCAP_VLAN_MTU actually worked for some chip versions,
>> more work is needed to distinguish the working chipsets.
>>
>
> Hi,
>
> I'm looking for reponts of aue(4) chipsets actually supporting VLAN_MTU.
> Mine does not. It identifies as:
>
> aue0 at uhub9 port 5 configuration 1 interface 0 "ADMtek USB To LAN
> Converter" rev 2.00/1.01 addr 5
> aue0: address 00:05:1b:b2:96:02
> ukphy0 at aue0 phy 1: Generic IEEE 802.3u media interface, rev. 1: OUI
> 0x000749, model 0x0001
>
> In case there are none, I would like to drop above mentioned
> IFCAP_VLAN_MTU flag for the aue(4) driver and look for OKs.
>
>
> Christopher
>
>
> --
> http://gmerlin.de
> OpenPGP: http://gmerlin.de/christopher.pub
> CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1
>
>

--
Kindest regards,
Tom Smyth.
Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

Chris Cappuccio
Tom Smyth [[hidden email]] wrote:
> Hi Chrisz,
>
> 4 bytes for the vlan header .. have you tried increasing the parent
> intetface mtu by 4bytes
>

IFCAP_VLAN_MTU is a direct bypass for this. "hardmtu" on the parent interface
is perhaps more interesting as it will limit everything including these
encapsulations

Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

Tom Smyth
Ok thanks for the info  i always find mtu confusing as i thought generally
it was referring to ip mtu..... while layer2 headers vlans and layer 2.5
headers such as mpls labels cw etc...would be outside the ip mtu...

Thanks again


On Wednesday, 22 April 2020, Chris Cappuccio <[hidden email]> wrote:

> Tom Smyth [[hidden email]] wrote:
> > Hi Chrisz,
> >
> > 4 bytes for the vlan header .. have you tried increasing the parent
> > intetface mtu by 4bytes
> >
>
> IFCAP_VLAN_MTU is a direct bypass for this. "hardmtu" on the parent
> interface
> is perhaps more interesting as it will limit everything including these
> encapsulations
>
>

--
Kindest regards,
Tom Smyth.
Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

Christopher Zimmermann-2
In reply to this post by Chris Cappuccio
On Tue, Apr 21, 2020 at 04:12:16PM -0700, Chris Cappuccio wrote:

>Tom Smyth [[hidden email]] wrote:
>> Hi Chrisz,
>>
>> 4 bytes for the vlan header .. have you tried increasing the parent
>> intetface mtu by 4bytes
>>
>
>IFCAP_VLAN_MTU is a direct bypass for this. "hardmtu" on the parent interface
>is perhaps more interesting as it will limit everything including these
>encapsulations

IFAP_VLAN_MTU will affect how the hardmtu is passed on to vlan child
interfaces. The vlan interfaces won't care for the parent's "soft" mtu
AFAICS:

hardmtu = ifp0->if_hardmtu;
if (!ISSET(ifp0->if_capabilities, IFCAP_VLAN_MTU))
        hardmtu -= EVL_ENCAPLEN;

Linux uses a MTU of 1536 for Pegasus chips. We always default to a
hardmtu of 1500. So the hardmtu can't be the cause for my interface not
managing full-size vlan.

Christopher


--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1

Reply | Threaded
Open this post in threaded view
|

Re: ADMtec aue(4) interface supporting VLAN_MTU ?

David Gwynne-5


> On 23 May 2020, at 7:54 am, Christopher Zimmermann <[hidden email]> wrote:
>
> On Tue, Apr 21, 2020 at 04:12:16PM -0700, Chris Cappuccio wrote:
>> Tom Smyth [[hidden email]] wrote:
>>> Hi Chrisz,
>>>
>>> 4 bytes for the vlan header .. have you tried increasing the parent
>>> intetface mtu by 4bytes
>>>
>>
>> IFCAP_VLAN_MTU is a direct bypass for this. "hardmtu" on the parent interface
>> is perhaps more interesting as it will limit everything including these
>> encapsulations
>
> IFAP_VLAN_MTU will affect how the hardmtu is passed on to vlan child interfaces. The vlan interfaces won't care for the parent's "soft" mtu AFAICS:

That is correct.

> hardmtu = ifp0->if_hardmtu;
> if (!ISSET(ifp0->if_capabilities, IFCAP_VLAN_MTU))
> hardmtu -= EVL_ENCAPLEN;
>
> Linux uses a MTU of 1536 for Pegasus chips. We always default to a hardmtu of 1500. So the hardmtu can't be the cause for my interface not managing full-size vlan.

We should set the hardmtu of the Pegasus chips higher then. Does Linux include the Ethernet header in that MTU there?

dlg

>
> Christopher
>
>
> --
> http://gmerlin.de
> OpenPGP: http://gmerlin.de/christopher.pub
> CB07 DA40 B0B6 571D 35E2  0DEF 87E2 92A7 13E5 DEE1
>