2002-02-28 21:51:38

by Chris Leech

[permalink] [raw]
Subject: hardware VLAN acceleration (RE: [BETA-0.92] Third test release of Tigon3 driver)

> On Wed, 27 Feb 2002, David S. Miller wrote:
>
> > [FEATURE] Yay, real HW acceleration hooks in the 802.1q VLAN layer.
> > Tigon3 takes advantage of it.
>
> > Adding support to the Acenic driver should be pretty easy and I'll
> > try to do that before catching some sleep. Jeff could also probably
> > cook up something quick for the e1000.
>
> That would be nice, a common way for hw-vlans is a good thing.
>
> Intel has also their own (kludgy?) way of doing hw-vlans in
> the current driver?
>
> - Pasi K?rkk?inen

The version of e1000 that Jeff merged in has no hardware VLAN capabilities
right now, the version distributed from Intel's web site has hooks for the
binary only iANS teaming/VLAN product.

That being said, I will add support to e1000 for a standard kernel interface
(e100 too, but there are other things to fix first). David's interface
looks very nice to me, especially in it's clear advertisement of
capabilities and simple transmit and receive design. Intel's hardware will
have no problem working with it.

I did have some questions about the entry points.

Is vlan_rx_kill_vid only there to ensure locking between vlan_hwaccel_rx and
unregister_802_1Q_vlan_dev? If so, could this be handled outside of the
driver?

Also, when a vlan dev is unregistered, does the driver need to know that the
vlan_group passed in to vlan_rx_register is no longer valid?

Chris

--
Chris Leech <[email protected]>
Network Software Engineer
UNIX/Linux/Netware Development Group
LAN Access Division, Intel


2002-02-28 22:58:12

by David Miller

[permalink] [raw]
Subject: Re: hardware VLAN acceleration

From: "Leech, Christopher" <[email protected]>
Date: Thu, 28 Feb 2002 13:47:25 -0800

Is vlan_rx_kill_vid only there to ensure locking between vlan_hwaccel_rx and
unregister_802_1Q_vlan_dev? If so, could this be handled outside of the
driver?

It is there because the VLAN layer has no buisness knowing how to lock
out receive interrupt processing in your driver.

The Acenic driver, for example, uses no SMP locking at all and runs
it's RX interrupts %100 lockless requiring a global "cli()" in order
to implement vlan_rx_kill_vid().

Also, when a vlan dev is unregistered, does the driver need to know that the
vlan_group passed in to vlan_rx_register is no longer valid?

The group is still valid, groups are never destroyed by the VLAN layer
once they are created.

Franks a lot,
David S. Miller
[email protected]