From owner-freebsd-net@freebsd.org Thu Feb 23 13:48:52 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A538CEB170 for ; Thu, 23 Feb 2017 13:48:52 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64F6EA08 for ; Thu, 23 Feb 2017 13:48:52 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id 203so175603680ith.0 for ; Thu, 23 Feb 2017 05:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KZqW76q7fsqlMTT66W90223fkmjHhyaEGHrWKWLKfzM=; b=CnrUsZsO6UG9wtpVxe9JGJdns5P0c7QmMEnaVyKILCh71cAeeW+5wNVQY92HYNJY53 ZTDjHORN8h0KDesdjA18NK3DNAeHUhXFQF+VLiLJaJKRHqA/pVBKYFEttPs95C5EGhqH ia7BvG/gHyeCalbM1KSl2rthEnaU1x/gVI9Vs7Fnb3N54MuHUL8FvWwDURPkP5se/YIa k+u0fyxZc5AGpdAyqUYBW7f93BD23rEAB8c8cA11yR9RztfZEZHvJoJShGBdGUozg1gk NkoI4nPsekQGZWG7OZWRRtkmsESR9ri3/UGVaZh5yQfbm5ILL6Ok6pGolU438xHpiU2Y TAag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KZqW76q7fsqlMTT66W90223fkmjHhyaEGHrWKWLKfzM=; b=YwUFmtHaG9cwMRcBQqdyiO1/7Q4voTA8c7R4cSFS91rTEsAZCorflKW2NlBvexqU6T 7C5cO6ntYhYg6UjL0ykvDtnOWHvvwpFQ1NZGVnoZ6D/mWRYr39/wyVxs+git5hqehxEN bBoEqkkvLwG22kYojaY97Of16iL2DgGfHogfH4dTbikTGYfOv15qSNG+SBZXdMSwpZAY zPUqiYAMoE0r1gPkLbZ8HSHqcMyTrJTL9xpE2/5thlbsbdBHlsa5pgqJ6IP3mX0LgI9Y 7fgESIAh3fqKY52NZQ9muXwhhRn4lvQ8BISolRmT4Q9076CJOHgSbz5cEdX6BitHfWpJ w7FA== X-Gm-Message-State: AMke39mrxyYux1OVGg8aWM3AEU53KIrs9oOHIttmEYFWtOKslJv6YHP6crCiAkrCAsi2dpIqhv1/pTwIS5aLEA== X-Received: by 10.36.29.80 with SMTP id 77mr2580127itj.29.1487857731786; Thu, 23 Feb 2017 05:48:51 -0800 (PST) MIME-Version: 1.0 References: <20170223124258.GA80687@staff.retn.net> In-Reply-To: <20170223124258.GA80687@staff.retn.net> From: Ben Woods Date: Thu, 23 Feb 2017 13:48:41 +0000 Message-ID: Subject: Re: tap(4): half-duplex and zero-speed ? To: Alexandre Snarskii , freebsd-net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 13:48:52 -0000 On Thu, 23 Feb 2017 at 8:43 pm, Alexandre Snarskii wrote: > > Hi! > > Long story short: if you try to aggregate tap(4) devices into lacp-based > lagg(4), aggregate will fail to negotiate lacp with remote end and will not > be able to pass traffic. > > Root cause: lacp code requires underlying interface to be full-duplex > (else it will not participate in lacp negotiation at all[1]) and have > non-zero speed (else it can not be selected as active aggregator[2], > and so if tap is the only lagg member - aggregate will not become active). > > Patch can be as trivial as: > > --- sys/net/if_tap.c.orig 2017-02-21 21:02:04.460053000 +0300 > +++ sys/net/if_tap.c 2017-02-21 21:02:12.580696000 +0300 > @@ -617,7 +617,7 @@ > dummy = ifmr->ifm_count; > ifmr->ifm_count = 1; > ifmr->ifm_status = IFM_AVALID; > - ifmr->ifm_active = IFM_ETHER; > + ifmr->ifm_active = IFM_ETHER | IFM_1000_T | > IFM_FDX; > if (tp->tap_flags & TAP_OPEN) > ifmr->ifm_status |= IFM_ACTIVE; > ifmr->ifm_current = ifmr->ifm_active; > > > [1]: > https://svnweb.freebsd.org/base/head/sys/net/ieee8023ad_lacp.c?revision=312678&view=markup#l483 > [2]: > https://svnweb.freebsd.org/base/head/sys/net/ieee8023ad_lacp.c?revision=312678&view=markup#l983 Hi Alexandre, Thanks for taking the time to look into the cause of this and for your clear explanation of the problem. Would you mind please submitting a bug report so this doesn't get forgotten? https://bugs.freebsd.org/ Regards, Ben -- -- From: Benjamin Woods woodsb02@gmail.com