Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4436064ioa; Wed, 27 Apr 2022 03:58:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF2BWPKIkXiYOU2qSLNPJA8bk0zpaaUcw878OQenDpbjpZr/K5cvq+yVZ2oJhqyahyOTcu X-Received: by 2002:a65:6093:0:b0:373:9c75:19ec with SMTP id t19-20020a656093000000b003739c7519ecmr24242612pgu.539.1651057120385; Wed, 27 Apr 2022 03:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651057120; cv=none; d=google.com; s=arc-20160816; b=W0mKzOldogaXdQtq36DP5rMlGBLIB6fDMM+Y1iHtTL6yslaHVtYpSSqHl2ekuoqe8U MSFG8QDNeppzhqzItvISVf8hgKs6xHc9zY6YYj7We53iZ5eo2xd57uTKaWZowrgQ32ho 0KCBAvNPTCdA5yfDLrT1QWcNGdIBJudHL7FxCoCiPt3NLcsiA1b9zCH6wrvqFXY/M4ce zv8Tvh9k25B6po6TH2gRIetvup+2TLyxrmunc2bESDi55npFgiJm3paqZm1HkE/4JtVg GWKyzZAla3gp6aFbdv+Wvv0eGHlrA58JgDTsgS5X9zWM0hs7cef4rCaedsQoMRdyF+K1 vSCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4OUEhKI8Cjay4lbPJyMsFeusogJ9fllpfDtDWrbEzNg=; b=LbVhtN5qIT+JSiKyD1VbYTyt0BgF8vsBppi3X4NQ2zxLwUVgR29JAnk5I+64te3UGA YUojuoLVYXoDUdxNJLxZ3YtWHGBpm83XhGyfip3ZRgqCsZPnpBdKqJKBioP7dZpzFGXn g0Vhb0TM4Mwb8D8bF6QgxZ5OCPOKndkl3ox180D0npU+yyPSPY2QRTdreMCb21nuRrd6 9qet/8an6128vWB/a5GkgV99m/ntieERblaqIlUtXryS/XZZnQ/9eFIGEuKS1bdZ6RkA +jQVUe7Iq1sreGNcBM8L8/8ZQVKXLoQTq+TpAm4YHVDOGjt9M3xmIYZM4LHoDw1lWR6B yrxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6vz74UX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u41-20020a056a0009a900b0050d866c1e43si774294pfg.253.2022.04.27.03.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:58:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=L6vz74UX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C3171C3A55; Wed, 27 Apr 2022 03:06:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347817AbiDZJYy (ORCPT + 99 others); Tue, 26 Apr 2022 05:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346666AbiDZJBJ (ORCPT ); Tue, 26 Apr 2022 05:01:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B2440901; Tue, 26 Apr 2022 01:43:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4B413B81CED; Tue, 26 Apr 2022 08:43:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0335C385A4; Tue, 26 Apr 2022 08:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962600; bh=vODgJ8/N38n2QubethSt6gI2SLcVIqnaSD0Dgq0Gjfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L6vz74UXmwqhC1whxyDdyd+8PTlSm1wZw4weywrXzh/EixhCcgO1MvtYCu1KGQ4GY fR9P1JCiOSQewtnj/8XL/bLZlwi3OA809dNYgGonfxLRFgAEUbr0YqGeKbcJ1c1bve AzreD7b2SrvFzdETS2O2aJP+BR4bQDz3fMn18Guc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grzegorz Nitka , Maciej Fijalkowski , Michal Swiatkowski , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.17 027/146] ice: allow creating VFs for !CONFIG_NET_SWITCHDEV Date: Tue, 26 Apr 2022 10:20:22 +0200 Message-Id: <20220426081750.831045448@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081750.051179617@linuxfoundation.org> References: <20220426081750.051179617@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maciej Fijalkowski [ Upstream commit aacca7a83b9753c562395ef328352dfd8c003c59 ] Currently for !CONFIG_NET_SWITCHDEV kernel builds it is not possible to create VFs properly as call to ice_eswitch_configure() returns -EOPNOTSUPP for us. This is because CONFIG_ICE_SWITCHDEV depends on CONFIG_NET_SWITCHDEV. Change the ice_eswitch_configure() implementation for !CONFIG_ICE_SWITCHDEV to return 0 instead -EOPNOTSUPP and let ice_ena_vfs() finish its work properly. CC: Grzegorz Nitka Fixes: 1a1c40df2e80 ("ice: set and release switchdev environment") Signed-off-by: Maciej Fijalkowski Signed-off-by: Michal Swiatkowski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.h b/drivers/net/ethernet/intel/ice/ice_eswitch.h index bd58d9d2e565..6a413331572b 100644 --- a/drivers/net/ethernet/intel/ice/ice_eswitch.h +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.h @@ -52,7 +52,7 @@ static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { } static inline int ice_eswitch_configure(struct ice_pf *pf) { - return -EOPNOTSUPP; + return 0; } static inline int ice_eswitch_rebuild(struct ice_pf *pf) -- 2.35.1