From nobody@FreeBSD.org  Thu Apr  6 15:20:13 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 688C816A400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Apr 2006 15:20:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2226843D46
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  6 Apr 2006 15:20:13 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k36FKC6c028094
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 6 Apr 2006 15:20:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k36FKClq028091;
	Thu, 6 Apr 2006 15:20:12 GMT
	(envelope-from nobody)
Message-Id: <200604061520.k36FKClq028091@www.freebsd.org>
Date: Thu, 6 Apr 2006 15:20:12 GMT
From: Vladimir Ivanov <wawa@yandex-team.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ng_fec doesn't allow jumbo packets
X-Send-Pr-Version: www-2.3

>Number:         95417
>Category:       kern
>Synopsis:       [netgraph] [patch] ng_fec doesn't allow jumbo packets
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 06 15:30:11 GMT 2006
>Closed-Date:    Mon Sep 18 15:38:12 GMT 2006
>Last-Modified:  Mon Sep 18 15:38:12 GMT 2006
>Originator:     Vladimir Ivanov
>Release:        RELENG_5
>Organization:
Yandex LLC
>Environment:
FreeBSD multiped.yandex.net 5.5-PRERELEASE FreeBSD 5.5-PRERELEASE #0: Tue Apr  4 11:56:54 MSD 2006     root@multiped.yandex.net:/usr/obj/usr/src/sys/MULTIPED-CORE  i386

>Description:
FEC (Etherchannel) interface doesn't allowed to use more than 1500 bytes MTU size.
The problem caused by bug in ng_fec.c
They use ether_ioctl to process SIOCSIFMTU ioctl call.

The patch allows to change MTU size according (and in sync) with bundled interfaces' capabilities.
>How-To-Repeat:
ifconfig fec0 mtu 1501
>Fix:
multiped:~$ cat ng_fec.c.patch
--- ng_fec.c.orig       Mon Aug 29 20:31:51 2005
+++ ng_fec.c    Wed Apr  5 20:36:18 2006
@@ -697,9 +697,29 @@ ng_fec_ioctl(struct ifnet *ifp, u_long c
        /* These two are mostly handled at a higher layer */
        case SIOCSIFADDR:
        case SIOCGIFADDR:
-       case SIOCSIFMTU:
                error = ether_ioctl(ifp, command, data);
                break;
+       case SIOCSIFMTU:
+                if ( (ifr->ifr_mtu < NG_FEC_MTU_MIN ) || (ifr->ifr_mtu > NG_FEC_MTU_MAX) ) {
+                        error = EINVAL;
+                } else {
+                       struct ng_fec_portlist  *p;
+                       struct ifnet    *bifp;
+                       TAILQ_FOREACH(p, &b->ng_fec_ports, fec_list) {
+                               bifp = p->fec_if;
+                               if ((bifp->if_ioctl)(bifp, SIOCSIFMTU, data)) {
+                                       error = EINVAL;
+                                       break;
+                               }
+
+                       }
+                       if (!error) {
+                               ifp->if_mtu = ifr->ifr_mtu;
+                               ng_fec_init(priv);
+                       }
+                }
+                break;
+

        /* Set flags */
        case SIOCSIFFLAGS:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: ru 
State-Changed-When: Fri Sep 15 16:06:43 UTC 2006 
State-Changed-Why:  
Patch applied to HEAD with slight mods (please see a commit log for 
details).  Thanks! 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Sep 15 16:06:43 UTC 2006 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=95417 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/95417: commit references a PR
Date: Fri, 15 Sep 2006 16:06:49 +0000 (UTC)

 ru          2006-09-15 16:06:27 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/netgraph         ng_fec.c 
   Log:
   Make it possible to set a larger MTU by attempting to set MTUs on all
   trunk ports first.  If that succeeds, and we're inside our own bounds,
   so be it.
   
   Still not ideal -- adding a port after changing an MTU doesn't change
   port's MTU, but a step in the right direction.
   
   PR:             kern/95417
   Submitted by:   Vladimir Ivanov <wawa AT yandex-team DOT ru>
   MFC after:      3 days
   
   I've slightly edited a patch to make the conditional logic positive
   and remove (what I think was) a redundant ng_fec_init() call.
   
   Revision  Changes    Path
   1.28      +19 -1     src/sys/netgraph/ng_fec.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: ru 
State-Changed-When: Mon Sep 18 15:37:56 UTC 2006 
State-Changed-Why:  
Fixed in 6.2-PRERELEASE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=95417 
>Unformatted:
