From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 21 07:20:03 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A8061065674 for ; Fri, 21 Sep 2012 07:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 335F38FC21 for ; Fri, 21 Sep 2012 07:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8L7K3G7020143 for ; Fri, 21 Sep 2012 07:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8L7K3qC020142; Fri, 21 Sep 2012 07:20:03 GMT (envelope-from gnats) Resent-Date: Fri, 21 Sep 2012 07:20:03 GMT Resent-Message-Id: <201209210720.q8L7K3qC020142@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Venkat Duvvuru Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D33D210656B8 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/171840: IPv6 packets transmitting only on queue 0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Sep 2012 07:20:03 -0000 >Number: 171840 >Category: misc >Synopsis: IPv6 packets transmitting only on queue 0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >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: >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: >Unformatted: