From nobody@FreeBSD.org  Wed Dec 12 10:37:53 2007
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 1256F16A417
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2007 10:37:53 +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 E859D13C447
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2007 10:37:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lBCAblLq018335
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 12 Dec 2007 10:37:47 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lBCAbltE018333;
	Wed, 12 Dec 2007 10:37:47 GMT
	(envelope-from nobody)
Message-Id: <200712121037.lBCAbltE018333@www.freebsd.org>
Date: Wed, 12 Dec 2007 10:37:47 GMT
From: kondo <kondo@technocomputer.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: RealTek 8169S RE device promiscuous mode was Not Active
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118572
>Category:       kern
>Synopsis:       [re] [patch] RealTek 8169S RE device promiscuous mode was Not Active
>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 Dec 12 10:40:02 UTC 2007
>Closed-Date:    Sun Feb 03 05:21:33 UTC 2008
>Last-Modified:  Sun Feb  3 05:30:02 UTC 2008
>Originator:     kondo
>Release:        FreeBSD 6.3-PRERELEASE
>Organization:
Technocomputer
>Environment:
reeBSD gw2-osaka.osaka.jcs.co.jp.local 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #2: Wed Dec 12 14:32:47 JST 2007     root@gw2-osaka.osaka.jcs.co.jp.local:/usr/obj/usr/src/sys/PFCARP  i386
>Description:
I use re0 on carp9.
This dump was failover backup-machine.
tcpdump -i re0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on re0, link-type EN10MB (Ethernet), capture size 96 bytes
19:23:36.672797 IP 10.101.9.252 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 29, prio 100, authtype none, intvl 1s, length 36
19:23:38.065010 IP 10.101.9.252 > vrrp.mcast.net: VRRPv2, Advertisement, vrid 29, prio 100, authtype none, intvl 1s, length 36

Ping was No problem.
ping 10.101.9.251
PING 10.101.9.251 (10.101.9.251): 56 data bytes
64 bytes from 10.101.9.251: icmp_seq=0 ttl=64 time=0.580 ms
64 bytes from 10.101.9.251: icmp_seq=1 ttl=64 time=0.425 ms

re0: <RealTek 8169S Single-chip Gigabit Ethernet> port 0xd000-0xd0ff mem 0xd04e1000-0xd04e10ff irq 20 at device 0.0 on pci6
miibus2: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> on miibus2
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
re0: Ethernet address: 00:16:01:xx:xx:xx


>How-To-Repeat:
tcpdump -i re0

>Fix:
diff -u /tmp/src/sys/dev/re/if_re.c /usr/src/sys/dev/re/if_re.c
--- /tmp/src/sys/dev/re/if_re.c 2007-12-12 19:35:51.000000000 +0900
+++ /usr/src/sys/dev/re/if_re.c 2007-12-12 19:32:31.000000000 +0900
@@ -636,7 +636,7 @@
        if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
                if (ifp->if_flags & IFF_PROMISC)
                        rxfilt |= RL_RXCFG_RX_ALLPHYS;
-               if (ifp->if_flags & IFF_ALLMULTI)
+                       /* if (ifp->if_flags & IFF_ALLMULTI) */
                        rxfilt |= RL_RXCFG_RX_MULTI;
                CSR_WRITE_4(sc, RL_RXCFG, rxfilt);
                CSR_WRITE_4(sc, RL_MAR0, 0xFFFFFFFF);


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 17 04:18:20 UTC 2007 
Responsible-Changed-Why:  
This does not seem i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118572 
Responsible-Changed-From-To: freebsd-bugs->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Mon Dec 17 10:14:21 UTC 2007 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118572 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Mon Dec 17 10:27:59 UTC 2007 
State-Changed-Why:  
It seems that RTL8169 series still need an explicit RL_RXCFG_RX_MULTI 
bit to receve multicast frames in promiscuous mode. The documentations 
are not clear how it handles receving frames from Rx filter on RTL8169. 
Would you try the following patch? 
http://people.freebsd.org/~yongari/re/re.promisc.patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118572 
State-Changed-From-To: feedback->patched 
State-Changed-By: yongari 
State-Changed-When: Thu Dec 20 07:27:07 UTC 2007 
State-Changed-Why:  
Thanks for your testing/report. Patch committed to HEAD. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/118572: commit references a PR
Date: Thu, 20 Dec 2007 07:26:26 +0000 (UTC)

 yongari     2007-12-20 07:26:20 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/re           if_re.c 
   Log:
   By definition promiscuous mode should see all unicast frames as well
   as multicast/broadcast frames. Previously re(4) ignored multicast
   frames in promiscuous mode. The RTL8169 datasheet was not clear
   how it handles multicast frames in promiscuous mode.
   
   PR:     kern/118572
   MFC after:      3 days
   
   Revision  Changes    Path
   1.100     +6 -2      src/sys/dev/re/if_re.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"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/118572: commit references a PR
Date: Sun,  3 Feb 2008 05:18:21 +0000 (UTC)

 yongari     2008-02-03 05:18:14 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/dev/re           if_re.c 
   Log:
   MFC if_re.c, rev 1.100 to RELENG_7
     By definition promiscuous mode should see all unicast frames as well
     as multicast/broadcast frames. Previously re(4) ignored multicast
     frames in promiscuous mode. The RTL8169 datasheet was not clear
     how it handles multicast frames in promiscuous mode.
   
     PR:   kern/118572
   
   Revision  Changes    Path
   1.95.2.4  +6 -2      src/sys/dev/re/if_re.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: yongari 
State-Changed-When: Sun Feb 3 05:21:01 UTC 2008 
State-Changed-Why:  
MFC done. Thanks for reporting! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/118572: commit references a PR
Date: Sun,  3 Feb 2008 05:20:36 +0000 (UTC)

 yongari     2008-02-03 05:20:26 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/dev/re           if_re.c 
   Log:
   MFC if_re.c, rev 1.100 to RELENG_6
     By definition promiscuous mode should see all unicast frames as well
     as multicast/broadcast frames. Previously re(4) ignored multicast
     frames in promiscuous mode. The RTL8169 datasheet was not clear
     how it handles multicast frames in promiscuous mode.
   
     PR:   kern/118572
   
   Revision   Changes    Path
   1.46.2.38  +6 -2      src/sys/dev/re/if_re.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"
 
>Unformatted:
