Add "ifconfig [-]vlan-hwtagging" to enable/disable VLAN hardware tagging

offload function. It's useful to see Ethernet frame's VLAN tag by
disabling with "ifconfig fooX -vlan-hwtagging" and "tcpdump -e -i fooX".
This commit is contained in:
msaitoh 2019-07-08 03:04:15 +00:00
parent 94ef24d019
commit 83631b96b8
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ether.c,v 1.3 2018/12/21 08:58:08 msaitoh Exp $ */
/* $NetBSD: ether.c,v 1.4 2019/07/08 03:04:15 msaitoh Exp $ */
/*
* Copyright (c) 1983, 1993
@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ether.c,v 1.3 2018/12/21 08:58:08 msaitoh Exp $");
__RCSID("$NetBSD: ether.c,v 1.4 2019/07/08 03:04:15 msaitoh Exp $");
#endif /* not lint */
#include <sys/param.h>
@ -67,6 +67,7 @@ static const struct kwinst ethercapskw[] = {
#if 0 /* notyet */
IFKW("vlan-hwfilter", ETHERCAP_VLAN_HWFILTER)
#endif
IFKW("vlan-hwtagging", ETHERCAP_VLAN_HWTAGGING),
IFKW("eee", ETHERCAP_EEE)
};

View File

@ -1,4 +1,4 @@
.\" $NetBSD: ifconfig.8,v 1.118 2019/07/04 13:55:31 wiz Exp $
.\" $NetBSD: ifconfig.8,v 1.119 2019/07/08 03:04:15 msaitoh Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
.\"
.Dd June 18, 2019
.Dd July 8, 2019
.Dt IFCONFIG 8
.Os
.Sh NAME
@ -699,6 +699,12 @@ support it.
.It Cm -tso6
Disable hardware-assisted TCP/IPv6 segmentation on interfaces that
support it.
.It Cm vlan-hwtagging
Enable hardware-assisted VLAN tag insertion/removal on interfaces that
support it.
.It Cm -vlan-hwtagging
Disable hardware-assisted VLAN tag insertion/removal on interfaces that
support it.
.It Cm maxupd Ar n
If the driver is a
.Xr pfsync 4