From nobody@FreeBSD.org  Fri Sep 21 07:18:11 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D33D210656B8
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 07:18:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 760AF8FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 07:18:11 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8L7IBES058864
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 21 Sep 2012 07:18:11 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8L7IA1E058863;
	Fri, 21 Sep 2012 07:18:10 GMT
	(envelope-from nobody)
Message-Id: <201209210718.q8L7IA1E058863@red.freebsd.org>
Date: Fri, 21 Sep 2012 07:18:10 GMT
From: Venkat Duvvuru <venkatduvvuru.ml@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: IPv6 packets transmitting only on queue 0
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171840
>Category:       kern
>Synopsis:       [ip6] IPv6 packets transmitting only on queue 0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 21 07:20:02 UTC 2012
>Closed-Date:    
>Last-Modified:  Sat Oct 06 03:29:38 UTC 2012
>Originator:     Venkat Duvvuru
>Release:        9.0-RELEASE
>Organization:
Emulex
>Environment:
FreeBSD root@xxx FreeBsd 9.0-RELEASE FreeBSD 9.0-RELEASE #12: Thu Aug 23 23:42:39 IST 2012     root@root@xxx FreeBsd:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
1. The below code is absent for ip6_output? This is causing the ipv6 traffic to always flow in just one queue. Flowid is filled by the driver in the receive path and the same flowid will be used to transmit packets. I think this logic is missing for ipv6 packets.

"netinet/ip_output.c" Function: ip_output
if (inp != NULL) {
                INP_LOCK_ASSERT(inp);
                M_SETFIB(m, inp->inp_inc.inc_fibnum);
                if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) {
                        m->m_pkthdr.flowid = inp->inp_flowid;
                        m->m_flags |= M_FLOWID;
                }
        }
2. "fle" is NULL after enabling FLOWTABLE for IPv6
 
"net/flowtable.c"
        if (af == AF_INET6)
        {
                fle = flowtable_lookup_mbuf6(ft, m);
                if (fle != NULL && m != NULL && (m->m_flags & M_FLOWID) == 0) {
                        m->m_flags |= M_FLOWID;
                        m->m_pkthdr.flowid = fle->f_fhash;
                }
        }
>How-To-Repeat:
Run ipv6 traffic with any tool and check the number of packets transmitted on all the created transmit queues. Only num packets on queue0 increases.
>Fix:
For the first problem I think we should populate inp->inp_flowid in the mbuf packet header. For the second problem, I'm not sure why flowtable_lookup_mbuf6 is returning NULL after enabling FLOWTABLE.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Oct 6 03:29:13 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

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