From nobody Thu Sep 01 07:21:27 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MJCCC2srtz4bbYN; Thu, 1 Sep 2022 07:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MJCCC26qsz3WnW; Thu, 1 Sep 2022 07:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662016887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCGed+kvuZxoDob9Uv/niVlvdIEE4u9LX/mBWXvHP4A=; b=S5t7V/SV1sXtRGafRUnIdLVT8sfCIKW83qnQbVfrvaUwxAVpkKv+lFrla8pkS03eaydp1x x/QNwQlO1lyvsHqpTk/E40NXuoxp6lCtMpcd0tAtsHnF0BdHARFQ2xrnLdCtlyvMAcb/np SxXk9sv7EpwPvOLi6cm9TG/vi0pT89IwiSUwfkPp0OVdSUjkNRG4m3lbm3IZ610PAONZ5b YnXpq9zkqkkItsMXAjZmZfZiewoU80wggqScagr5LTBWaSGmtY5T0KOzMQtEhf+OA3WMXG hudifOxf3gY8ecHpRR4hbRlw2CdzfgptRCxwqackhIP44LR9B/nhTKxMssZP5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MJCCC19spzPVJ; Thu, 1 Sep 2022 07:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2817LRpD072014; Thu, 1 Sep 2022 07:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2817LR3r072013; Thu, 1 Sep 2022 07:21:27 GMT (envelope-from git) Date: Thu, 1 Sep 2022 07:21:27 GMT Message-Id: <202209010721.2817LR3r072013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Kornel=20Dul=C4=99ba?= Subject: git: 108b6eb670ec - stable/13 - neta: Fix MTU change sequence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kd X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 108b6eb670ecced4674747fbec26c39fc8df0a55 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662016887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCGed+kvuZxoDob9Uv/niVlvdIEE4u9LX/mBWXvHP4A=; b=AvAMpro3Es+SPa6bpPG81RPBp7CuGvQaDd3cwi3CW165MjO7h4j0lUx0aT97ByOIFYVUZG mN2Jv9mQiLo+qDUP8GJ8RNrvQf43x6xHf03Ubqmu89X6pv4bUSLcn+K4QtYG0N+6SNxwRu 8QWzyvJKUpU3ikYAo3/gTTaJM3iXGL8spCBb5iqTpCmV7UMie0GY8riA1V47BmLQtH47us 2RItN5NkKEVJ9vVNa3Mp8SRBEx67NLOuh2ODtOAyUsMpy7RKvvHxnN+XQMRWTA4UV62KsQ yfhAEawPiQlDtTqYRmqaEcmmr6EYFtbkaBRtJkh3fmE1Np7QojKoW618XHO57g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662016887; a=rsa-sha256; cv=none; b=dMo8nPdOORAEYn32l9xZU0/jv2OfqwY7lS6Zr+FwlOKPNYyLwdBdMEUZB26LMGOMBL6TzM KjvAVuuce/WbprSnoRbSQRrI89cTpfx033IYdZSoOMsjuCUbTxkn5W5c/kOsnksaPlmx6Z xLBWGmT7uc//m+I9xoXMfmlmD7Z3/fkbCSu+AKF7ZchrLux5qPOZJXMF41G7zRELxoGyoq ZUreq65guILIlPA9Nm1b6Yslkjz6iugDgglVgYrON/21Mf6TPwPCzGb6pKFmHOiDskYtK+ 85KG4jzyv3ohK2odEWRR4+Bs8pY0AQwDMX0dqJGuwaJRb00KMv7cRXIAULJ6cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kd: URL: https://cgit.FreeBSD.org/src/commit/?id=108b6eb670ecced4674747fbec26c39fc8df0a55 commit 108b6eb670ecced4674747fbec26c39fc8df0a55 Author: Kornel Dulęba AuthorDate: 2022-08-18 16:53:14 +0000 Commit: Kornel Dulęba CommitDate: 2022-09-01 07:14:43 +0000 neta: Fix MTU change sequence The IFF_DRV_RUNNING flag is used to see if the interface needs to be temporarily brought down during MTU change sequence. The problem here is that this flag is cleared in mvneta_stop_locked, resulting in the reinitialization logic never being executed after MTU has been changed. Fix that by saving the flag value before the interface is brought down. Reported by: Jérôme Tomczyk Approved by: mw(mentor) Obtained from: Semihalf Sponsored by: Stormshield MFC after: 2 weeks (cherry picked from commit 97ecdc00ac5ac506f4119be9570d13de2d3a003a) --- sys/dev/neta/if_mvneta.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c index 215d35b1141a..4520680dc96b 100644 --- a/sys/dev/neta/if_mvneta.c +++ b/sys/dev/neta/if_mvneta.c @@ -2067,9 +2067,11 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct ifreq *ifr; int error, mask; uint32_t flags; + bool reinit; int q; error = 0; + reinit = false; sc = ifp->if_softc; ifr = (struct ifreq *)data; switch (cmd) { @@ -2170,8 +2172,10 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) * Reinitialize RX queues. * We need to update RX descriptor size. */ - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + reinit = true; mvneta_stop_locked(sc); + } for (q = 0; q < MVNETA_RX_QNUM_MAX; q++) { mvneta_rx_lockq(sc, q); @@ -2185,7 +2189,7 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } mvneta_rx_unlockq(sc, q); } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (reinit) mvneta_init_locked(sc); mvneta_sc_unlock(sc);