From nobody Mon Sep 11 22:35:38 2023 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 4Rl1ky5TcLz4sTx9; Mon, 11 Sep 2023 22:35:38 +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 4Rl1ky4hs2z3g33; Mon, 11 Sep 2023 22:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694471738; 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=Z9WZ/VtzR16IEAZZcqE6YFyNo7xIQOHwJmZuBw0UCc4=; b=ZfLOq08jb1kS6xmVMLsJnfmdB5/gcGN7YCgNR5/UxZIQuTzwxVJo96jyubr3Y1CkBn5u7i 0MArfx2Nv5uzfmfUwh7W9mAf275qkTHDYF/GITAOgNxBC1k+qCcvB7f3Lwyh71VI1IibeZ ONi7at1OcNfaZ2lZZXh5Yh8bIgy1jRAwSjbMazNBN3KqqCrIqXLcNdvTEto1+Rn9KhbXHS MWjZJ5jhcojG6/KOO1GbTrAHA4ivKDvz8RVdMpdfxblnWl1SUYF8MccQJ8/67jcGpMXLe6 gOBH4IJW2sHgjT3D1cwGR829cn49drB+wISb+m6jhg0MNT7y0T30pEL0fODjIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694471738; a=rsa-sha256; cv=none; b=TkdZd7B5kOWM5qKRA46j96g9K93m06yGhZCON/1A0YHeO3tYqyfe5AIFA5ju28Sft4Atf9 PcRYalYRYT7W05i30zKA/bkGsxSLewIA39zF3+SdKo+yj3/vL6O5X4g5N8a9v4sOcnxu0+ Bbdcvhdk/Zd6zFgjpVs8Uuq/7zu8AU9nQMowo4WqqSJb4qCHu9q8RFLm6L/u8jCBZ8TSU6 NEwmoKMJoZViv6X1FsxnSJYxB2B37Vn3tedUB/HidWDxTsv/fj0uq6RC1vt00SbkJ7n/s4 lzU88BGOavoE1sQwKLzkDfc8g28hE7iWFeYA6I/jIqlWmPlH/7+Vejtag8f8xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694471738; 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=Z9WZ/VtzR16IEAZZcqE6YFyNo7xIQOHwJmZuBw0UCc4=; b=t6jicR2q8fUVYlfeJpB3vtKjjHG4Dlp3Jd0aqu6CGAG0xvqiL/0jjtXtu02A0mXy3Ac/Fv hwyblB5y/4k7SyvlD7kAHzfJw/Ydl4vwDOliN0beFPT1C2BK3jHv69HnpoYS2aEfHGivKA UkKtHWpSggBQQNrZUxPHr036PJkuGAfws8vQHrbNUXApkVXTuspxe5522zZic3b7/5Nvd/ sIiHrWayoc8vtTe/HCwgQhJpAK8D1hA+PsHBWmY3yQ/OkknO4XlNwfoziNo2izU1Nawu/m 5Rs879xk+tae9lcpXBAoJ393X1lanM0d0bh1fqjVtzcXIv7COx2QHS6bRwm/6Q== 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 4Rl1ky3nbQz16gK; Mon, 11 Sep 2023 22:35:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38BMZcKX056923; Mon, 11 Sep 2023 22:35:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38BMZcGv056920; Mon, 11 Sep 2023 22:35:38 GMT (envelope-from git) Date: Mon, 11 Sep 2023 22:35:38 GMT Message-Id: <202309112235.38BMZcGv056920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 699014f7981b - stable/13 - ice: Don't restart on VLAN changes 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 699014f7981bdda8826ecb6aab783911a0f5c43c Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=699014f7981bdda8826ecb6aab783911a0f5c43c commit 699014f7981bdda8826ecb6aab783911a0f5c43c Author: Kevin Bowling AuthorDate: 2023-08-24 20:40:35 +0000 Commit: Kevin Bowling CommitDate: 2023-09-11 22:34:20 +0000 ice: Don't restart on VLAN changes In rS360398, a new iflib device method was added with default of opt out for VLAN events needing an interface reset. This re-init is unnecessary for ice(4). Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558 (cherry picked from commit 14a14e36aee2e6b848c239ac29090ad4cb66fbf7) --- sys/dev/ice/if_ice_iflib.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 58e4b77585ee..be1aa86234c7 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -83,6 +83,7 @@ static int ice_if_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data); static int ice_if_i2c_req(if_ctx_t ctx, struct ifi2creq *req); static int ice_if_suspend(if_ctx_t ctx); static int ice_if_resume(if_ctx_t ctx); +static bool ice_if_needs_restart(if_ctx_t, enum iflib_restart_event); static int ice_msix_que(void *arg); static int ice_msix_admin(void *arg); @@ -170,6 +171,7 @@ static device_method_t ice_iflib_methods[] = { DEVMETHOD(ifdi_i2c_req, ice_if_i2c_req), DEVMETHOD(ifdi_suspend, ice_if_suspend), DEVMETHOD(ifdi_resume, ice_if_resume), + DEVMETHOD(ifdi_needs_restart, ice_if_needs_restart), DEVMETHOD_END }; @@ -3084,3 +3086,21 @@ ice_if_resume(if_ctx_t ctx) return (0); } +/* ice_if_needs_restart - Tell iflib when the driver needs to be reinitialized + * @ctx: iflib context + * @event: event code to check + * + * Defaults to returning false for unknown events. + * + * @returns true if iflib needs to reinit the interface + */ +static bool +ice_if_needs_restart(if_ctx_t ctx __unused, enum iflib_restart_event event) +{ + switch (event) { + case IFLIB_RESTART_VLAN_CONFIG: + default: + return (false); + } +} +