From patchwork Thu Jan 11 15:03:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Malz X-Patchwork-Id: 1885658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T9nzK60bkz1yPp for ; Fri, 12 Jan 2024 02:05:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rNwcN-0002iq-Kj; Thu, 11 Jan 2024 15:05:16 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rNwar-0002DI-JG for kernel-team@lists.ubuntu.com; Thu, 11 Jan 2024 15:03:42 +0000 Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 943033F286 for ; Thu, 11 Jan 2024 15:03:40 +0000 (UTC) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-50e7b5c3582so5594083e87.1 for ; Thu, 11 Jan 2024 07:03:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704985417; x=1705590217; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nmc6sEHzzKAyb25PtCpojWujEGS3RX6K+1XzWSzWjZA=; b=c/Yzj9ZHc0GRftNNTz0d5rFam0KyUhJ2Mqm3XtfYljF5Hmctvxb66R6OCXg4q6PVJF IKKGFtzpKlqSrT8Q3V1u/EZ0nk9oU6TYXO01+8fi16Ecnuu4sSIDNAf3dVYfUJsuXAR6 m49PG1A/jGFnBgGN5vqXEG9xMF49U1nLkxlabjDYNh+N+Za2YM/leuyytCCPxedQmpPU LM4Gp75gcORpsuxFp4CteKBRf2hvYYTr9U5dpDTnvJ5qJfti7H8yuMCPMVuGXSmobZ/K 6w7r3Wzttt5fs6nqy5+EC/6B15nIDuikBz7rrhr8d78eP32gNRtMFCKvB4lXAV9rMQZk LH0Q== X-Gm-Message-State: AOJu0Yx4V6qf59eH1ZwzUphz0AG5uaBC00DcbUFzhTPo1YMcH8EPzsXI qE/mSVeaZ4d8DMho2ohyvFA4aBruTMRdA01mC0FUMSbFZJX1Q+inosfQf2okDirSBFu+PIgqax7 wjB1DeHmMuH+L5b36GwMExmOw5dS2S3Sv7rrRz4wapGzzCIRsZ8k7fbIN X-Received: by 2002:ac2:5f76:0:b0:50e:4a24:28b1 with SMTP id c22-20020ac25f76000000b0050e4a2428b1mr598414lfc.123.1704985417012; Thu, 11 Jan 2024 07:03:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHAzCs66hHWdqisBGtBYKout525KmgE4xM/tYFg4lZTPEuJA3LdqWmrfxrA2xJL1m5eXaDfA== X-Received: by 2002:ac2:5f76:0:b0:50e:4a24:28b1 with SMTP id c22-20020ac25f76000000b0050e4a2428b1mr598405lfc.123.1704985416527; Thu, 11 Jan 2024 07:03:36 -0800 (PST) Received: from rmalz.. (89-64-27-150.dynamic.chello.pl. [89.64.27.150]) by smtp.gmail.com with ESMTPSA id q15-20020a19430f000000b0050eacb1d982sm215997lfa.236.2024.01.11.07.03.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 07:03:36 -0800 (PST) From: Robert Malz To: kernel-team@lists.ubuntu.com Subject: [SRU][M][PATCH v2 2/2] ice: alter feature support check for SRIOV and LAG Date: Thu, 11 Jan 2024 16:03:34 +0100 Message-Id: <20240111150334.760997-3-robert.malz@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240111150334.760997-1-robert.malz@canonical.com> References: <20240111150334.760997-1-robert.malz@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Dave Ertman BugLink: https://bugs.launchpad.net/bugs/2036239 Previously, the ice driver had support for using a handler for bonding netdev events to ensure that conflicting features were not allowed to be activated at the same time. While this was still in place, additional support was added to specifically support SRIOV and LAG together. These both utilized the netdev event handler, but the SRIOV and LAG feature was behind a capabilities feature check to make sure the current NVM has support. The exclusion part of the event handler should be removed since there are users who have custom made solutions that depend on the non-exclusion of features. Wrap the creation/registration and cleanup of the event handler and associated structs in the probe flow with a feature check so that the only systems that support the full implementation of LAG features will initialize support. This will leave other systems unhindered with functionality as it existed before any LAG code was added. Fixes: bb52f42acef6 ("ice: Add driver support for firmware changes for LAG") Reviewed-by: Jesse Brandeburg Signed-off-by: Dave Ertman Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen (cherry picked from commit 4d50fcdc2476eef94c14c6761073af5667bb43b6) Signed-off-by: Robert Malz --- drivers/net/ethernet/intel/ice/ice_lag.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c index d018e68f5a6d..584b069f2746 100644 --- a/drivers/net/ethernet/intel/ice/ice_lag.c +++ b/drivers/net/ethernet/intel/ice/ice_lag.c @@ -381,6 +381,8 @@ int ice_init_lag(struct ice_pf *pf) int err; ice_lag_init_feature_support_flag(pf); + if (!ice_is_feature_supported(pf, ICE_F_SRIOV_LAG)) + return 0; pf->lag = kzalloc(sizeof(*lag), GFP_KERNEL); if (!pf->lag)