From patchwork Thu Jan 11 15:03:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Malz X-Patchwork-Id: 1885657 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 4T9nyr5lJYz1yPp for ; Fri, 12 Jan 2024 02:05:08 +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 1rNwc5-0002cH-P2; Thu, 11 Jan 2024 15:04:57 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rNwai-0002Cc-4O for kernel-team@lists.ubuntu.com; Thu, 11 Jan 2024 15:03:33 +0000 Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) (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-0.canonical.com (Postfix) with ESMTPS id B4D804102F for ; Thu, 11 Jan 2024 15:03:28 +0000 (UTC) Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-50e73a71c8aso3660032e87.3 for ; Thu, 11 Jan 2024 07:03:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704985406; x=1705590206; 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=7RXUsZPw7M6KC9pOQR59aGoduMg/2e34ETT9pVT6p5w=; b=cR2qFGNpZs0ROCQwP+cSlAYg1g+L31uFt7jDmicQoEvDknVwrRwXMoPInYwijpUsy3 B9Q3IE8pLPPu9TzEHhree4gqZYBFhO/CR14Ek8lHS3AeQ9vdMvoIpcSs8I+hFL9jJlVK KhcM31skI+6ybpo83XfR3o966XOgJYGEvgPm52ADRpM3rQDruR2kicTPWXYwc0GBCPNs mO8i6N1FuqjgVs2m9LWdPzJdO4HdBUF6idVFmaH307C1ZWIfmqj8aOpqZoUJrjk7elyg jd4HbIKUQ/YzOENiZEVsj9vklGAzigsdZ9DWbPIAwzCCUZSXEczZyS9P0fhaOkQziJFa x35g== X-Gm-Message-State: AOJu0YzSv3DRYkgOaUTtYaYgUmivJaGEtWI/rkubAr5+uGpN2BdCt93Q mJIq19BS8Ej7QP2+RGozrrf8CD7s9h/Xq2tJ9unYuq961aBBkFZmmygbUbHXI8fw8+pArVx8BFe /Dm+ZOUS+0Jq8ETcYegYEvrypKJSL2gUe2KV84qqgCTqKJKr0ZNjToL1k X-Received: by 2002:a05:6512:11c8:b0:50e:c081:ae6d with SMTP id h8-20020a05651211c800b0050ec081ae6dmr314228lfr.85.1704985406285; Thu, 11 Jan 2024 07:03:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IF30KsgzN7g1ws1x4zx8Fk+vbFmNLkZZsr0QKDIi+oNT0LZcYahku6xohU+Mm3LkSqeD66Ufw== X-Received: by 2002:a05:6512:11c8:b0:50e:c081:ae6d with SMTP id h8-20020a05651211c800b0050ec081ae6dmr314222lfr.85.1704985405713; Thu, 11 Jan 2024 07:03:25 -0800 (PST) Received: from rmalz.. (89-64-27-150.dynamic.chello.pl. [89.64.27.150]) by smtp.gmail.com with ESMTPSA id t14-20020ac243ae000000b0050e3b654751sm211329lfl.199.2024.01.11.07.03.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 07:03:25 -0800 (PST) From: Robert Malz To: kernel-team@lists.ubuntu.com Subject: [PATCH v2 3/3][SRU][J] ice: alter feature support check for SRIOV and LAG Date: Thu, 11 Jan 2024 16:03:21 +0100 Message-Id: <20240111150321.760930-4-robert.malz@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240111150321.760930-1-robert.malz@canonical.com> References: <20240111150321.760930-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 e5cfeb7a5ec3..886907750667 100644 --- a/drivers/net/ethernet/intel/ice/ice_lag.c +++ b/drivers/net/ethernet/intel/ice/ice_lag.c @@ -390,6 +390,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)