From nobody@FreeBSD.org  Wed Apr 21 05:43:01 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E7921065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 05:43:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id F1F628FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 05:43:00 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o3L5gxIQ078875
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 Apr 2010 05:42:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o3L5gxcZ078874;
	Wed, 21 Apr 2010 05:42:59 GMT
	(envelope-from nobody)
Message-Id: <201004210542.o3L5gxcZ078874@www.freebsd.org>
Date: Wed, 21 Apr 2010 05:42:59 GMT
From: Masahiko KIMOTO <kimoto@soum.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: multicast packets aren't received when PROMISC mode on fxp.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         145905
>Category:       kern
>Synopsis:       [fxp] multicast packets aren't received when PROMISC mode on fxp.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 05:50:04 UTC 2010
>Closed-Date:    Wed May 12 17:37:16 UTC 2010
>Last-Modified:  Wed May 12 17:37:16 UTC 2010
>Originator:     Masahiko KIMOTO
>Release:        7.2-STABLE
>Organization:
SOUM Corporation
>Environment:
System: FreeBSD toscano.soum.co.jp 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Jul 3 \
12:40:47 JST 2009 root@toscano.soum.co.jp:/usr/src/sys/amd64/compile/TOSCANO am\
d64

>Description:
When set promiscuous mode on fxp interface, multicast packets 
which the host doesn't joined address are not received.

>How-To-Repeat:
set promiscuous flag on fxp. tcpdump on the interface and send
multicast packet to not-joined address. they does not been
observed.

>Fix:
Intel NIC has two flags for promiscuous mode, one for unicast and another
is for multicast. When the user set promiscuous mode flag on the interface,
both flags should be set.  Although current cord (including -current) set
only unicast promiscuous flag.  fxp.c on OpenBSD fixed this problem.
Please refer and import it.



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 21 05:57:31 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145905 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Wed Apr 21 16:49:05 UTC 2010 
State-Changed-Why:  
Would try the patch at the following URL? 
http://people.freebsd.org/~yongari/fxp/fxp.promisc.patch 



Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Wed Apr 21 16:49:05 UTC 2010 
Responsible-Changed-Why:  
Take. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/145905: commit references a PR
Date: Fri,  7 May 2010 16:43:10 +0000 (UTC)

 Author: yongari
 Date: Fri May  7 16:43:00 2010
 New Revision: 207748
 URL: http://svn.freebsd.org/changeset/base/207748
 
 Log:
   It seems controller has two types of promiscuous control, one for
   unicast and the other for multicast. To receive multicast frames
   that host didn't join in promiscuous mode, driver have to set
   promiscuous mode for multicast frames as well.
   The Open Source Software Developer Manual for i8255x was not clear
   how to handle promiscuous mode.
   
   PR:		kern/145905
   MFC after:	5 days
 
 Modified:
   head/sys/dev/fxp/if_fxp.c
 
 Modified: head/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- head/sys/dev/fxp/if_fxp.c	Fri May  7 16:22:06 2010	(r207747)
 +++ head/sys/dev/fxp/if_fxp.c	Fri May  7 16:43:00 2010	(r207748)
 @@ -2345,7 +2345,7 @@ fxp_init_body(struct fxp_softc *sc)
  	cbp->force_fdx =	0;	/* (don't) force full duplex */
  	cbp->fdx_pin_en =	1;	/* (enable) FDX# pin */
  	cbp->multi_ia =		0;	/* (don't) accept multiple IAs */
 -	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : 0;
 +	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : prm;
  	cbp->gamla_rx =		sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0;
  	cbp->vlan_strip_en =	((sc->flags & FXP_FLAG_EXT_RFA) != 0 &&
  	    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: yongari 
State-Changed-When: Fri May 7 16:53:56 UTC 2010 
State-Changed-Why:  
Submitter confirms r207748 fixed the issue. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/145905: commit references a PR
Date: Wed, 12 May 2010 17:07:38 +0000 (UTC)

 Author: yongari
 Date: Wed May 12 17:07:19 2010
 New Revision: 207972
 URL: http://svn.freebsd.org/changeset/base/207972
 
 Log:
   MFC r207748:
     It seems controller has two types of promiscuous control, one for
     unicast and the other for multicast. To receive multicast frames
     that host didn't join in promiscuous mode, driver have to set
     promiscuous mode for multicast frames as well.
     The Open Source Software Developer Manual for i8255x was not clear
     how to handle promiscuous mode.
   
     PR:		kern/145905
 
 Modified:
   stable/8/sys/dev/fxp/if_fxp.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
   stable/8/sys/geom/sched/   (props changed)
 
 Modified: stable/8/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- stable/8/sys/dev/fxp/if_fxp.c	Wed May 12 16:59:58 2010	(r207971)
 +++ stable/8/sys/dev/fxp/if_fxp.c	Wed May 12 17:07:19 2010	(r207972)
 @@ -2345,7 +2345,7 @@ fxp_init_body(struct fxp_softc *sc)
  	cbp->force_fdx =	0;	/* (don't) force full duplex */
  	cbp->fdx_pin_en =	1;	/* (enable) FDX# pin */
  	cbp->multi_ia =		0;	/* (don't) accept multiple IAs */
 -	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : 0;
 +	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : prm;
  	cbp->gamla_rx =		sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0;
  	cbp->vlan_strip_en =	((sc->flags & FXP_FLAG_EXT_RFA) != 0 &&
  	    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/145905: commit references a PR
Date: Wed, 12 May 2010 17:13:10 +0000 (UTC)

 Author: yongari
 Date: Wed May 12 17:12:47 2010
 New Revision: 207976
 URL: http://svn.freebsd.org/changeset/base/207976
 
 Log:
   MFC r207748:
     It seems controller has two types of promiscuous control, one for
     unicast and the other for multicast. To receive multicast frames
     that host didn't join in promiscuous mode, driver have to set
     promiscuous mode for multicast frames as well.
     The Open Source Software Developer Manual for i8255x was not clear
     how to handle promiscuous mode.
   
     PR:		kern/145905
 
 Modified:
   stable/7/sys/dev/fxp/if_fxp.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/dev/fxp/if_fxp.c
 ==============================================================================
 --- stable/7/sys/dev/fxp/if_fxp.c	Wed May 12 17:12:38 2010	(r207975)
 +++ stable/7/sys/dev/fxp/if_fxp.c	Wed May 12 17:12:47 2010	(r207976)
 @@ -2339,7 +2339,7 @@ fxp_init_body(struct fxp_softc *sc)
  	cbp->force_fdx =	0;	/* (don't) force full duplex */
  	cbp->fdx_pin_en =	1;	/* (enable) FDX# pin */
  	cbp->multi_ia =		0;	/* (don't) accept multiple IAs */
 -	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : 0;
 +	cbp->mc_all =		ifp->if_flags & IFF_ALLMULTI ? 1 : prm;
  	cbp->gamla_rx =		sc->flags & FXP_FLAG_EXT_RFA ? 1 : 0;
  	cbp->vlan_strip_en =	((sc->flags & FXP_FLAG_EXT_RFA) != 0 &&
  	    (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) ? 1 : 0;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: yongari 
State-Changed-When: Wed May 12 17:35:46 UTC 2010 
State-Changed-Why:  
MFC to stable/8 and stable/7 done. 
Thanks. 

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