From owner-freebsd-current@freebsd.org Fri Nov 6 23:46:21 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F0CA2D67ED for ; Fri, 6 Nov 2020 23:46:21 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4CScV46NQYz3DYY for ; Fri, 6 Nov 2020 23:46:20 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id DAF9B2D6EC4; Fri, 6 Nov 2020 23:46:20 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DAB8F2D67EB for ; Fri, 6 Nov 2020 23:46:20 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CScV45cRpz3Dmv for ; Fri, 6 Nov 2020 23:46:20 +0000 (UTC) (envelope-from ricera10@gmail.com) Received: by mail-lj1-f178.google.com with SMTP id 23so3243284ljv.7 for ; Fri, 06 Nov 2020 15:46:20 -0800 (PST) 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:cc; bh=XqKoQ9Islxhb/qzQ2hwS9e2ZtwLQnV4nJ/Br5NnLKy0=; b=Bk4upNuOdfPR/b2ui2G+aULifsSFJ9Fkt5dfRUCcYI1okPlwLHnwvLrTnX0rjvzizz 1rvHzAgMxhZ2/LvrLUn853gDSBynmoz5zCP1HQOVuJWiZoBXHmCFm0AhU9Gt1df8K15D cE8h4Cj38x2gYmDy4+s4tMvqJKvsQOzLzajKoSpkOFur7fOeGd+2qCPbxr8McS2oIaWP WgJCZZcI6I98eTe/bX5AlOADZzcmn+0kOFGQKUkYD/djFG3nFPzAtUbqd9dopVGAO9yS 2/U0LseX6EsQQZOe+5HYhmbi1y+/l+XglY6t36QxIOZuMM7AxHK2PsVGTWnIYP5bHIQf EwVw== X-Gm-Message-State: AOAM5300Kvvk5NLf9SssWWx56n8UrlwLHO7FNTS9cmPAbgvfTEdxYr87 gKxtdpJF3f7Ui27yrq5Ob3NZPJ+XDdY= X-Google-Smtp-Source: ABdhPJw4AaNXfuP52rG5TypQ5V7aBa4cbFJ58BnRwneGyqCyKeQ79K4cfDnVdhvhI7zuyI8cafqU0w== X-Received: by 2002:a2e:b1c2:: with SMTP id e2mr1740631lja.282.1604706378514; Fri, 06 Nov 2020 15:46:18 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id f129sm318079lfd.201.2020.11.06.15.46.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Nov 2020 15:46:17 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id v144so4229822lfa.13 for ; Fri, 06 Nov 2020 15:46:17 -0800 (PST) X-Received: by 2002:a05:6512:793:: with SMTP id x19mr1872691lfr.171.1604706377040; Fri, 06 Nov 2020 15:46:17 -0800 (PST) MIME-Version: 1.0 References: <88004d48-4434-875a-5a36-0627b00c2f38@gmail.com> <1906251966.36777.1590562439792.JavaMail.open-xchange@opme11oxm03aub.bagnolet.francetelecom.fr> <997c1389-5e18-b07e-d342-c787c841a4c4@gmail.com> <711876429.20200601003941@serebryakov.spb.ru> <05a17072-570a-6e05-d3e6-802b3bf30e57@sentex.net> In-Reply-To: <05a17072-570a-6e05-d3e6-802b3bf30e57@sentex.net> From: Eric Joyner Date: Fri, 6 Nov 2020 15:46:06 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Link flap when adding / removing a vlan (was Re: r360902 breaks VLAN interface on if_em (82579LM)) To: mike tancsa Cc: lev@freebsd.org, current X-Rspamd-Queue-Id: 4CScV45cRpz3Dmv X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2020 23:46:21 -0000 Ah -- I didn't implement the fix I had in that bugzilla correctly -- em and igb devices will use the same function instead of using two different ones even though it seems em devices generally require the interface restart yet igb devices do not. The other issue is that I still don't know which devices need a restart / which devices do not, or whether a restart is strictly necessary and if there is another way to do this without worrying about restarting the device. - Eric On Fri, Nov 6, 2020 at 3:35 PM mike tancsa wrote: > On 11/6/2020 5:32 PM, Eric Joyner wrote: > > Could you reply to that issue with what you've found? > > > > Though, as far as I can recall, igb(4) devices are not supposed to do > > the iflib reset talked about in the bug, so I wouldn't expect to see a > > link flap on those. > > > Hi Eric, > > I have added my findings to > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240818 > > I tried it on 3 different vendor's boards. All I210 variants it seems. > > I am testing with > > --- if_em.c 2020-11-06 15:00:22.120953000 -0500 > +++ /tmp/if_em.c 2020-11-06 14:59:55.678195000 -0500 > @@ -4047,6 +4047,7 @@ > { > switch (event) { > case IFLIB_RESTART_VLAN_CONFIG: > + return (false); > default: > return (true); > } > > And if fixes the problem, but not quite sure if it introduces any > regressions or other issues ? > > ---Mike > > > > - Eric > > > > On Fri, Nov 6, 2020 at 12:48 PM mike tancsa > > wrote: > > > > On 11/6/2020 2:17 PM, mike tancsa wrote: > > > On 5/31/2020 5:39 PM, Lev Serebryakov wrote: > > >> Hello Ian, > > >> > > >> Thursday, May 28, 2020, 2:45:48 AM, you wrote: > > >> > > >>> I noticed that my VLAN interfaces stopped working after a > > recent build. > > >>> tcpdump showed traffic leaving leaving and entering the > > interface but no > > >>> host on the network actually received any packets from this > > host. A > > >>> binary search led me to r360902 and indeed the following > > change fixed > > >>> the issue for me: > > >> Problem is, this change will return terrible situation when > > adding new VLAN > > >> will flap connection status. > > >> > > >> It all worked before iflib: hardware VLAN filtering worked, and > > >> adding/removing new VLAN didn't cause link to flap. > > >> > > >> Now, with iflib, looks like we can not have all good things at > > once :( > > > > > > Looks like this is captured in > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240818 > > > > > > > > > Hi All, > > > > > > Just came across this thread as I am running into this behaviour on > > > RELENG_12. Adding a new vlan causes all vlans on the parent > > interface > > > to flap. Not the greatest thing as it bounces a LOT of traffic > > > potentially, flaps routing etc. Is there a way around this ? > > > > > > This is on r367411 releng12 > > > > > > igb0@pci0:2:0:0: class=0x020000 card=0x153315d9 > > chip=0x15338086 > > > rev=0x03 hdr=0x00 > > > vendor = 'Intel Corporation' > > > device = 'I210 Gigabit Network Connection' > > > class = network > > > subclass = ethernet > > > > > > eg. just something simple like > > > > > > ifconfig vlan16 create 10.1.2.3/29 vlandev > > igb1 vlan 16 > > > > > > # dmesg | tail -8 > > > igb1: link state changed to DOWN > > > vlan16: link state changed to DOWN > > > vlan2049: link state changed to DOWN > > > vlan15: link state changed to DOWN > > > igb1: link state changed to UP > > > vlan16: link state changed to UP > > > vlan2049: link state changed to UP > > > vlan15: link state changed to UP > > > > > > > > > ---Mike > > > > > > > > > > > > > > > _______________________________________________ > > > freebsd-current@freebsd.org > > mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > > > To unsubscribe, send any mail to > > "freebsd-current-unsubscribe@freebsd.org > > " > > > > > _______________________________________________ > > freebsd-current@freebsd.org > > mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > > To unsubscribe, send any mail to > > "freebsd-current-unsubscribe@freebsd.org > > " > > >