NetBSD Problem Report #57652

From Manuel.Bouyer@lip6.fr  Wed Oct 11 10:20:20 2023
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 4EE151A9238
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Oct 2023 10:20:20 +0000 (UTC)
Message-Id: <20231011102005.0B80977C2@armandeche.soc.lip6.fr>
Date: Wed, 11 Oct 2023 12:20:04 +0200 (MEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@NetBSD.org
Subject: ixl(4) doesn't fully support vlan(4)
X-Send-Pr-Version: 3.95

>Number:         57652
>Category:       kern
>Synopsis:       ixl(4) doesn't fully support vlan(4)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 11 10:25:00 +0000 2023
>Closed-Date:    Wed Oct 18 06:53:37 +0000 2023
>Last-Modified:  Wed Oct 18 11:35:01 +0000 2023
>Originator:     Manuel Bouyer
>Release:        NetBSD 10.0_BETA
>Organization:
>Environment:
>Description:

	a vlan(4) interface attached to ixl(4) has its MTU truncated to 1496:
vlan584: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
        capabilities=0x3ff00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
	capabilities=0x3ff00<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
	capabilities=0x3ff00<UDP6CSUM_Rx,UDP6CSUM_Tx>
	enabled=0
	vlan: 584 parent: ixl1

	This is because ixl(4) doesn't announce VLAN_MTU in ec_capabilities.
	I tried this simple patch:

--- sys/dev/pci/if_ixl.c.orig	2023-10-11 11:23:55.534559844 +0200
+++ sys/dev/pci/if_ixl.c	2023-10-11 11:24:20.514192237 +0200
@@ -1320,6 +1320,7 @@
 #endif
 	ether_set_vlan_cb(&sc->sc_ec, ixl_vlan_cb);
 	sc->sc_ec.ec_capabilities |= ETHERCAP_JUMBO_MTU;
+	sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_MTU;
 	sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWTAGGING;
 	sc->sc_ec.ec_capabilities |= ETHERCAP_VLAN_HWFILTER;

	which cause vlan(4) to have a 1500-byte MTU, but then packets larger
	than 1496 bytes are not received so this is not enough; the driver
	needs to handle VLAN_MTU in ec_enabled too.

	BTW, I have JUMBO_MTU set in ec_enabled, even though I'm not using
	large ethernet frames ...
ixl1: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=0x3ff00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
	capabilities=0x3ff00<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
	capabilities=0x3ff00<UDP6CSUM_Rx,UDP6CSUM_Tx>
	enabled=0
	ec_capabilities=0xe<VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWFILTER>
	ec_enabled=0x6<VLAN_HWTAGGING,JUMBO_MTU>

>How-To-Repeat:
	configure a vlan(4) on a ixl(4) and try a ping -s1500 from a remote
	machine
>Fix:
	please

>Release-Note:

>Audit-Trail:
From: "Shoichi YAMAGUCHI" <yamaguchi@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57652 CVS commit: src/sys/dev/pci
Date: Fri, 13 Oct 2023 02:22:20 +0000

 Module Name:	src
 Committed By:	yamaguchi
 Date:		Fri Oct 13 02:22:20 UTC 2023

 Modified Files:
 	src/sys/dev/pci: if_ixl.c

 Log Message:
 ixl(4): added ETHERCAP_VLAN_MTU support

 PR kern/57652


 To generate a diff of this commit:
 cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/if_ixl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Manuel Bouyer <manuel.bouyer@lip6.fr>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: PR/57652 CVS commit: src/sys/dev/pci
Date: Fri, 13 Oct 2023 19:50:29 +0200

 On Fri, Oct 13, 2023 at 02:25:02AM +0000, Shoichi YAMAGUCHI wrote:
 > The following reply was made to PR kern/57652; it has been noted by GNATS.
 > 
 > From: "Shoichi YAMAGUCHI" <yamaguchi@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/57652 CVS commit: src/sys/dev/pci
 > Date: Fri, 13 Oct 2023 02:22:20 +0000
 > 
 >  Module Name:	src
 >  Committed By:	yamaguchi
 >  Date:		Fri Oct 13 02:22:20 UTC 2023
 >  
 >  Modified Files:
 >  	src/sys/dev/pci: if_ixl.c
 >  
 >  Log Message:
 >  ixl(4): added ETHERCAP_VLAN_MTU support
 >  
 >  PR kern/57652
 >  
 >  
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/if_ixl.c

 Hello
 I tested a pullup of 1.94 + 1.95 on netbsd-10, it works fine for me
 So please request a pullup to netbsd-10 !

 -- 
 Manuel Bouyer, LIP6, Sorbonne Université.           Manuel.Bouyer@lip6.fr
      NetBSD: 26 ans d'experience feront toujours la difference
 --

State-Changed-From-To: open->closed
State-Changed-By: yamaguchi@NetBSD.org
State-Changed-When: Wed, 18 Oct 2023 06:53:37 +0000
State-Changed-Why:
fixed


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57652 CVS commit: [netbsd-10] src/sys/dev/pci
Date: Wed, 18 Oct 2023 11:30:30 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Oct 18 11:30:30 UTC 2023

 Modified Files:
 	src/sys/dev/pci [netbsd-10]: if_ixl.c

 Log Message:
 Pull up following revision(s) (requested by yamaguchi in ticket #417):

 	sys/dev/pci/if_ixl.c: revision 1.94
 	sys/dev/pci/if_ixl.c: revision 1.95

 ixl(4): added ETHERCAP_VLAN_MTU support
 PR kern/57652

 ixl(4): limit receive frame size upto 9600 even if ETHERCAP_VLAN_MTU is enabled


 To generate a diff of this commit:
 cvs rdiff -u -r1.88.4.1 -r1.88.4.2 src/sys/dev/pci/if_ixl.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.