NetBSD Problem Report #53082

From martin@duskware.de  Thu Mar  8 19:11:58 2018
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AE2AA7A1F2
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  8 Mar 2018 19:11:58 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: ifconfig(8) option: enable/disable all interface capabilities
X-Send-Pr-Version: 3.95

>Number:         53082
>Category:       bin
>Synopsis:       ifconfig(8) option: enable/disable all interface capabilities
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 08 19:15:00 +0000 2018
>Last-Modified:  Fri Mar 09 07:45:01 +0000 2018
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 8.99.12 NetBSD 8.99.12 (NIGHT-OWL) #587: Wed Mar 7 11:44:31 CET 2018 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:

Some network interface have strange sets of capabilities.
An example:

cnmac1: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=15500<IP4CSUM_Rx,TCP4CSUM_Rx,UDP4CSUM_Rx,TCP6CSUM_Rx>
        capabilities=15500<UDP6CSUM_Rx>
        enabled=0
        ec_capabilities=1<VLAN_MTU>
        ec_enabled=0
        address: 04:18:d6:f0:4b:e5
        media: Ethernet autoselect (none)
        status: no carrier

Now to enable all these offload options, I have to use something like:

ifconfig_cnmac0="udp4csum-rx tcp4csum-rx udp6csum-rx tcp6csum-rx ip4csum-rx"

in /etc/rc.conf (or the equivalent /etc/ifconfig.cnmac0 file).

Sometimes the exact flags change over time when the driver gets fixed
or enhanced.

It would be very convenient to have a shortcut in ifconfig that allows
to enable or disable all existing capabilites with a single command,
like:

 ifconfig cnmac1 enable-all
 ifconfig cnmac1 disable-all

>How-To-Repeat:
n/a

>Fix:
n/a

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/53082: ifconfig(8) option: enable/disable all interface
 capabilities
Date: Thu, 8 Mar 2018 20:38:17 +0000

 would it be more beneficial to have any capability that works enabled by default?

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/53082: ifconfig(8) option: enable/disable all interface
 capabilities
Date: Fri, 9 Mar 2018 08:43:29 +0100

 On Thu, Mar 08, 2018 at 08:40:00PM +0000, coypu@sdf.org wrote:
 >  would it be more beneficial to have any capability that works enabled by default?

 All that are not known to be buggy: yes.
 But still an option to toggle them all later (on and off) would be nice.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.