From nobody Thu Aug 24 20:52:01 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 4RWwHk3842z4rYwC; Thu, 24 Aug 2023 20:52:02 +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 4RWwHk1068z3QKv; Thu, 24 Aug 2023 20:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692910322; 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=LaBsRpLCHTPPtdjkux1JCY9Uo+oUITENjl0VrXx+1kc=; b=vHzwB8y1yRbvmP2BVMfsl7sMQXVofKwd92l7Pp4zY74wvW95axx3RadylGuNC9tSTgdgpY wcFkPHRARrtM1t180H5jWKOdOM/4atTgEvmhmYL7LmUoMoPGINdN3oLs87qCUZbviVnY3F EjpKS1UVKGzksWJ0VyJ4YZIk0xeSNgHKWsVrWE6DROQ4d1KwFH+GoozTGj3s7L7eWuxj/m tcaTvGxf6FUiaFiPNGTdCPJCzTwZN5SNz7W0ZqlroRc1r0dGi1kVvtLPQteHlsLSS8T0EZ TK6ttBk/anhjICNjvieDYlxWa7SpfajDr6sc9mjSDi41Kp6ycj4wNCD8j9Y+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692910322; 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=LaBsRpLCHTPPtdjkux1JCY9Uo+oUITENjl0VrXx+1kc=; b=E5Gl11ihntqbmdfmtpv7vhxBuXgv6BN1UVOaJeKxK2wdzFiyMLSe41gaceMUlq2Fwuz96K D10z9PZim0hMhurNtxDx7n7FpelaCdt7MW2+n0ARMdJkTf3Z3r17Nn2TXW96nGNJVpMInR ccuBeSdt5/50RCWq5WNTH+vlNaXI7nbTGaP/WtxqtH3jqPNWmQuH92fwX60KxMPKbLD4SF EiN01pNvoad+DLAC2Dq19jDsrNyy2KFPss6mmMcdculODh6fD3B8Rw0kJnzBTvg9Kj3LBj H/GZAgqXN/EjX3BTxiS+4mBxWtz6vHDAMKaLqZXyLo1q5ao8NjB4oMC4yMcsng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692910322; a=rsa-sha256; cv=none; b=EsZdIzMgKAkEVYzSoKJ00Gc45UOfCQn6+3sfcgqMYgRKYw+vliQ262QRDZmHq+bR70nH6Y 7p9uINovJjVUc1Mefjq33i6WuRN/yzV6OKvKANwGk+dXh7EB+kxQnnFcrmsijHZiVGPoJx XJwtOeooUyCu+lfo3oG8ldwLGiT2WHed43aH5L0YIp1XJz7T+4QWvXn6nKGbWaC1xX6joN mYagjd9uqDww5zouSF48v+BJaUe6AV2UTdPYnR9/BL1QwmWmHzD340x4LxXs+41vk1l1L6 nEo2VK98NGWDbk3rZL6Y9hi3cd8xbnfxwWz7kFz2MtPr5pRKeoICjr4f1LUM+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RWwHk055TzhjF; Thu, 24 Aug 2023 20:52:02 +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 37OKq1FZ039616; Thu, 24 Aug 2023 20:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37OKq1oe039613; Thu, 24 Aug 2023 20:52:01 GMT (envelope-from git) Date: Thu, 24 Aug 2023 20:52:01 GMT Message-Id: <202308242052.37OKq1oe039613@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 14a14e36aee2 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 14a14e36aee2e6b848c239ac29090ad4cb66fbf7 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=14a14e36aee2e6b848c239ac29090ad4cb66fbf7 commit 14a14e36aee2e6b848c239ac29090ad4cb66fbf7 Author: Kevin Bowling AuthorDate: 2023-08-24 20:40:35 +0000 Commit: Kevin Bowling CommitDate: 2023-08-24 20:46:57 +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). MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D41558 --- 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 2397fce11596..8d03bdfd23fb 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 }; @@ -3076,3 +3078,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); + } +} +