From nobody@FreeBSD.org  Mon Sep 10 11:02:42 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 7CF7A106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Sep 2012 11:02:42 +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 68BF48FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Sep 2012 11:02:42 +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 q8AB2gfe077998
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Sep 2012 11:02:42 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q8AB2gDL077997;
	Mon, 10 Sep 2012 11:02:42 GMT
	(envelope-from nobody)
Message-Id: <201209101102.q8AB2gDL077997@red.freebsd.org>
Date: Mon, 10 Sep 2012 11:02:42 GMT
From: Nikolau Nevzorov <nevzorovn@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: alc network driver + tso + vlan does not work. 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171520
>Category:       kern
>Synopsis:       [alc] alc network driver + tso + vlan does not work.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    yongari
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 10 11:10:02 UTC 2012
>Closed-Date:    
>Last-Modified:  Mon Oct 22 04:20:00 UTC 2012
>Originator:     Nikolau Nevzorov
>Release:        FreeBSD 9.0-RELEASE
>Organization:
>Environment:
louna# uname -a
FreeBSD louna 9.0-RELEASE FreeBSD 9.0-RELEASE #1 r237140: Sun Jun 17 12:20:32 YEKT 2012     niko@louna:/usr/obj/usr/src/sys/LOUNA  amd64

>Description:
alc network driver + tso + vlan does not work. 

alc0: <Atheros AR8132 PCIe Fast Ethernet> port 0x5000-0x507f mem 0x57000000-0x5703ffff irq 16 at device 0.0 on pci1
alc0: 15872 Tx FIFO, 15360 Rx FIFO
alc0: Using 1 MSI message(s).
miibus0: <MII bus> on alc0
atphy0: <Atheros F1 10/100/1000 PHY> PHY 0 on miibus0
atphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow

Hello, I have a system using the ALC network card driver with vlans. By default the driver enables TSO4 support on the card. This support does not seem to work in this configuration and causes the OS to generate packets larger then MTU which are sent to the card to be fragmented. This doesn't seem to happen and the packets are dropped. This causes TCP connections to go extremely slowly as many re-transitions occur. ifconfig alc0 -tso fixes the problem. 

The problem doesn't occur without vlans. And this problem doesn't occur on routed packet's, only on generated on this host.

There was thread on this problem on 2010 but without localisation of problem.
http://www.freebsd.org/cgi/query-pr.cgi?pr=147985

>How-To-Repeat:
Create vlans on alc interface and try to download via vlan and any file transfer protoco file bigger, than 1mb.
>Fix:
disable TSO on iface

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 10 16:30:46 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171520 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Thu Oct 18 01:40:32 UTC 2012 
State-Changed-Why:  
I'm pretty sure TSO over VLAN worked well on my box. 
Could you share your exact network configuration and let me know 
how I can reproduce it? 


Responsible-Changed-From-To: freebsd-net->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Thu Oct 18 01:40:32 UTC 2012 
Responsible-Changed-Why:  
Grab. 

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

From: Eugene Grosbein <egrosbein@rdtc.ru>
To: Nikolay Nevzorov <nevzorovn@gmail.com>
Cc: yongari@freebsd.org, "net@freebsd.org" <net@freebsd.org>,
        bug-followup@freebsd.org
Subject: Re: kern/171520: [alc] alc network driver + tso + vlan does not work.
Date: Mon, 22 Oct 2012 11:15:28 +0700

 22.10.2012 11:09, Nikolay Nevzorov :
 > Any traffic throuhg NAT does not cause problems. And any routed traffic so on.
 > 
 > Problem only with traffic that generated on host with alc0, because host generate packets much more bigger than MTU (about 2300 bytes per packet with MTU 1500), a see it with tcpdump on alc0. 
 
 Perhaps, that's another problem then. Just to make in really clean, try kernel without LIBALIAS
 and do not start mpd during the test as it may load libalias.ko by itself.
 
>Unformatted:
