Bug #30

NIC vlan(4) capabilities

Added by dragonfly over 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hello,

This updates the drivers equipped to do hardware VLAN support to
announce the fact. This is already done by em(4) and re(4) and allows
control of the features via ifconfig. Capabilities were checked against
FreeBSD and the respective man pages.

Is it worth setting IFCAP_VLAN_MTU in dc(4), fxp(4), sis(4), ste(4) and
tx(4) as they are documented as supporting long frames for vlan natively?

Regards

Gary

netif_vlan.diff Magnifier (2.93 KB) dragonfly, 12/30/2005 08:15 PM

History

#1 Updated by dillon over 7 years ago

:Hello,
:
:This updates the drivers equipped to do hardware VLAN support to
:announce the fact. This is already done by em(4) and re(4) and allows
:control of the features via ifconfig. Capabilities were checked against
:FreeBSD and the respective man pages.
:
:Is it worth setting IFCAP_VLAN_MTU in dc(4), fxp(4), sis(4), ste(4) and
:tx(4) as they are documented as supporting long frames for vlan natively?
:
:Regards
:
:Gary

I don't know how this got lost, I noticed it while searching for
the recent vlan thread. Gary posted it in December.

Sephe, are these patches still applicable? It looks like they do.

(this is unrelated to the recent vlan bug thread)

-Matt
Matthew Dillon
<>

:--------------000909040708090002030001
:Content-Type: text/plain;
: name="netif_vlan.diff"
:Content-Transfer-Encoding: 7bit
:Content-Disposition: inline;
: filename="netif_vlan.diff"
:
:Index: bge/if_bge.c
:===================================================================
:RCS file: /home/dcvs/src/sys/dev/netif/bge/if_bge.c,v
:retrieving revision 1.51
:diff -u -r1.51 if_bge.c
:--- bge/if_bge.c 29 Nov 2005 19:56:50 -0000 1.51
:+++ bge/if_bge.c 30 Dec 2005 19:29:21 -0000
:@@ -1661,7 +1661,8 @@
: ifq_set_maxlen(&ifp->if_snd, BGE_TX_RING_CNT - 1);
: ifq_set_ready(&ifp->if_snd);
: ifp->if_hwassist = BGE_CSUM_FEATURES;
:- ifp->if_capabilities = IFCAP_HWCSUM;
:+ ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING |
:+ IFCAP_VLAN_MTU;
: ifp->if_capenable = ifp->if_capabilities;
:
: /*
:Index: gx/if_gx.c
:===================================================================
:RCS file: /home/dcvs/src/sys/dev/netif/gx/if_gx.c,v
:retrieving revision 1.22
:diff -u -r1.22 if_gx.c
:--- gx/if_gx.c 28 Nov 2005 17:13:42 -0000 1.22
:+++ gx/if_gx.c 30 Dec 2005 19:50:46 -0000
:@@ -335,11 +335,12 @@
: ifp->if_init = gx_init;
: ifp->if_mtu = ETHERMTU;
: ifq_set_maxlen(&ifp->if_snd, GX_TX_RING_CNT - 1);
:+ ifp->if_capabilities = IFCAP_VLAN_HWTAGGING;
: ifq_set_ready(&ifp->if_snd);
:
: /* see if we can enable hardware checksumming */
: if (gx->gx_vflags & GXF_CSUM) {
:- ifp->if_capabilities = IFCAP_HWCSUM;
:+ ifp->if_capabilities |= IFCAP_HWCSUM;
: ifp->if_capenable = ifp->if_capabilities;
: }
:
:Index: nge/if_nge.c
:===================================================================
:RCS file: /home/dcvs/src/sys/dev/netif/nge/if_nge.c,v
:retrieving revision 1.35
:diff -u -r1.35 if_nge.c
:--- nge/if_nge.c 29 Nov 2005 19:56:53 -0000 1.35
:+++ nge/if_nge.c 30 Dec 2005 19:19:08 -0000
:@@ -849,7 +849,7 @@
: ifq_set_maxlen(&ifp->if_snd, NGE_TX_LIST_CNT - 1);
: ifq_set_ready(&ifp->if_snd);
: ifp->if_hwassist = NGE_CSUM_FEATURES;
:- ifp->if_capabilities = IFCAP_HWCSUM;
:+ ifp->if_capabilities = IFCAP_HWCSUM | IFCAP_VLAN_HWTAGGING;
: ifp->if_capenable = ifp->if_capabilities;
:
: /*
:Index: ti/if_ti.c
:===================================================================
:RCS file: /home/dcvs/src/sys/dev/netif/ti/if_ti.c,v
:retrieving revision 1.39
:diff -u -r1.39 if_ti.c
:--- ti/if_ti.c 29 Nov 2005 19:56:56 -0000 1.39
:+++ ti/if_ti.c 30 Dec 2005 19:33:36 -0000
:@@ -1409,7 +1409,8 @@
: sc = device_get_softc(dev);
: ifp = &sc->arpcom.ac_if;
: if_initname(ifp, device_get_name(dev), device_get_unit(dev));
:- ifp->if_capabilities = IFCAP_HWCSUM;
:+ ifp->if_capabilities = IFCAP_HWCSUM |
:+ IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
: ifp->if_capenable = ifp->if_capabilities;
:
: pci_enable_busmaster(dev);
:Index: txp/if_txp.c
:===================================================================
:RCS file: /home/dcvs/src/sys/dev/netif/txp/if_txp.c,v
:retrieving revision 1.34
:diff -u -r1.34 if_txp.c
:--- txp/if_txp.c 11 Dec 2005 01:54:09 -0000 1.34
:+++ txp/if_txp.c 30 Dec 2005 19:35:16 -0000
:@@ -1723,6 +1723,7 @@
: if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_VLAN) {
: sc->sc_tx_capability |= OFFLOAD_VLAN;
: sc->sc_rx_capability |= OFFLOAD_VLAN;
:+ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
: }
:
: #if 0
:
:--------------000909040708090002030001--
:

#2 Updated by sepherosa over 7 years ago

I thought you had committed it :P

Yeah, of course they do. I will commit them once I got home.

Best Regards,
sephe

Also available in: Atom PDF