Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2519503rda; Wed, 25 Oct 2023 05:21:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8TdzDOLftNOC9hFeUT70QN5+HrF3auSpGMoQcTJVAFORge+5XE4JsRnk9mN+s8gLnt28z X-Received: by 2002:a05:6808:2005:b0:3ae:b06:2131 with SMTP id q5-20020a056808200500b003ae0b062131mr18924692oiw.0.1698236486090; Wed, 25 Oct 2023 05:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698236486; cv=none; d=google.com; s=arc-20160816; b=ozArHsFicxu2KBjxPL+BE1LhvxRIxMVR5UQcpRudPFYW0D8e78IUp6uA4m75k2yqsL yExZuLiREjwzgvW3Weo3ETShGDwE5Lp8fa6/RgApiTmWTv8/dOYip6YU7+2IFQZ3o0Iv lcek3gGyjuZrAKrT0M9xoPNx+pq7+rBf4WP5eFwIyyQ3gLcxdXpzoNzwMrU3alg28o62 uetoZjlheiRUQ7/mOmCxD3DkC5MBZHC356wOYhD4YbN+EFnpGBrcV539znC+KRGKKEz7 ezRTUWuCYWBrnV1J3BgHzUEpDO0OjjTuCESelqtT/1yPtXyvsSBgacLeW/oR1j7nkolk dhKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fShXsPgDOgnyfdb+jgOvlSS+wejkoeOfsPohFpEDw2M=; fh=TVNsQzdRxfuNbvvo11+sb6ImyDcaj0EkdolFIbAxUuA=; b=wmVw0jUUyCmtYm+cpyyMDdu5F/VfjCC6TrujrSg6d9LmwSFBGUDz5rYJMWsvPYjpCQ QMHBOWPep3+E6nQoN2JH57YrUkV07FPVXFoJktEhxUFVAMKI6NzFfVXK9fLChBGUL82x oFzKkTprKm4Nc0OK6wq78Ty+X2MqZUTXw9ReMt+I8WeRSQLZHHBs7V3REvYscoRMoUHE GmkoQpA15GqhTHDajdgOQT1iIU5cnpUHk6K0DDYD52fi6ktV9dgeaC5tD/iDvv2satmh 04bP7S+7cn42rM5DKOyogipv7ano9nEbPgexlb4JTsZ6iHAl98UtlzHeCTMAGKOFU1BG fpHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=Y3D0GZLw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p18-20020a254212000000b00d43b05af683si10867802yba.651.2023.10.25.05.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@resnulli-us.20230601.gappssmtp.com header.s=20230601 header.b=Y3D0GZLw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20CB080842E2; Wed, 25 Oct 2023 05:21:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343648AbjJYMUz (ORCPT + 99 others); Wed, 25 Oct 2023 08:20:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234803AbjJYMUy (ORCPT ); Wed, 25 Oct 2023 08:20:54 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9485F129 for ; Wed, 25 Oct 2023 05:20:51 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c503da4fd6so83158401fa.1 for ; Wed, 25 Oct 2023 05:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20230601.gappssmtp.com; s=20230601; t=1698236450; x=1698841250; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fShXsPgDOgnyfdb+jgOvlSS+wejkoeOfsPohFpEDw2M=; b=Y3D0GZLwp4Cxfvy1Vlg/OeQDdgGUtYHcrDj6HSPXVJZ4SrrLtPlh4+8H3kkM+i2QIh ydP/1v8jN9h/Ud9iJLWhn95fX2Pu1SacGUlEWMnv70NQ7MTtsI1mbNPBJEALrAuKif5X aCuIgEWVfxtgCV3te2QuZw6dpkteIRsNeclEtwqZ3L8Dc0L1Y3DM4qqYJ5aPssi+6Y3p 65VYkyxIkYnPJTA8dynaQNVvTfXDqwo1sFZ/1URM1gte9GqzoKHaZed70danwvygb1zZ 4fRMA6Aak3AXCw7yDvmZiN/pBJ9xxugil6YIJBCRktPCbpTELxvleSKr23veew1cU1hR smJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698236450; x=1698841250; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fShXsPgDOgnyfdb+jgOvlSS+wejkoeOfsPohFpEDw2M=; b=sLeKQoqq//ViCsXj1BOsGk+3ANxtz7+P76z2YOwqmTRf4ASufiZYZZ46EeXeAGJAg6 fO1seEjiVDAv5SXuk+N+O+NqWiM5gE014eWFCZNOcui5or/TWdLxCT5Ag0lwuPbZAUkK Ato1zE7s6GDug51kZMusuItPy3ZKBQ4vrhMtiHPFInGpulj8KUkIPKCKeU1AmsrV3Xw7 JmhciIElxqoPS28PbbBEtXm9rl1qIrSdS/XQIVD455MO4P4rByZQHDjgRf42FmO5CFJ9 q6CJvfS/FFDNulpUrvzMG242X/Y3BTjmkJafFsttEFSx035v/ngXugm3qBLQV52aqKMD eOwg== X-Gm-Message-State: AOJu0YxRZLXh0EyKFwcjd2Vbzilk0OpvH5QVbM/eNYL6Y8SoGVcrHxM2 SxFOQDUKVO8x21Nsl8h65LtzlA== X-Received: by 2002:a05:651c:221c:b0:2c5:1ad0:c318 with SMTP id y28-20020a05651c221c00b002c51ad0c318mr12340683ljq.44.1698236449624; Wed, 25 Oct 2023 05:20:49 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c12d500b004081a011c0esm18864853wmd.12.2023.10.25.05.20.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:20:48 -0700 (PDT) Date: Wed, 25 Oct 2023 14:20:47 +0200 From: Jiri Pirko To: Wojciech Drewek Cc: Ivan Vecera , netdev@vger.kernel.org, Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Jacob Keller Subject: Re: [PATCH iwl-next 1/2] i40e: Remove VF MAC types Message-ID: References: <20231025103315.1149589-1-ivecera@redhat.com> <20231025103315.1149589-2-ivecera@redhat.com> <8a8f54a8-1a18-4797-a592-b57bc6fc45c1@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 25 Oct 2023 05:21:07 -0700 (PDT) Wed, Oct 25, 2023 at 02:16:39PM CEST, jiri@resnulli.us wrote: >Wed, Oct 25, 2023 at 12:48:37PM CEST, wojciech.drewek@intel.com wrote: >> >> >>On 25.10.2023 12:33, Ivan Vecera wrote: >>> The i40e_hw.mac.type cannot to be equal to I40E_MAC_VF or >>> I40E_MAC_X722_VF so remove helper i40e_is_vf(), simplify >>> i40e_adminq_init_regs() and remove enums for these VF MAC types. >>> >>> Signed-off-by: Ivan Vecera >>> --- >>> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 33 ++++++------------- >>> drivers/net/ethernet/intel/i40e/i40e_type.h | 8 ----- >>> 2 files changed, 10 insertions(+), 31 deletions(-) >>> >>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c >>> index 29fc46abf690..896c43905309 100644 >>> --- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c >>> +++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c >>> @@ -17,29 +17,16 @@ static void i40e_resume_aq(struct i40e_hw *hw); >>> static void i40e_adminq_init_regs(struct i40e_hw *hw) >>> { >>> /* set head and tail registers in our local struct */ >>> - if (i40e_is_vf(hw)) { >>> - hw->aq.asq.tail = I40E_VF_ATQT1; >>> - hw->aq.asq.head = I40E_VF_ATQH1; >>> - hw->aq.asq.len = I40E_VF_ATQLEN1; >>> - hw->aq.asq.bal = I40E_VF_ATQBAL1; >>> - hw->aq.asq.bah = I40E_VF_ATQBAH1; >>> - hw->aq.arq.tail = I40E_VF_ARQT1; >>> - hw->aq.arq.head = I40E_VF_ARQH1; >>> - hw->aq.arq.len = I40E_VF_ARQLEN1; >>> - hw->aq.arq.bal = I40E_VF_ARQBAL1; >>> - hw->aq.arq.bah = I40E_VF_ARQBAH1; >> >>What about removing those I40E_VF_* defines? >>This is their only usage here, right? > >Wait, do you suggest to use the values directly? That would be >wild even for i40e :) Ah, sec. This is duplicated in drivers/net/ethernet/intel/iavf/iavf_register.h. That confused me. > > >> >>> - } else { >>> - hw->aq.asq.tail = I40E_PF_ATQT; >>> - hw->aq.asq.head = I40E_PF_ATQH; >>> - hw->aq.asq.len = I40E_PF_ATQLEN; >>> - hw->aq.asq.bal = I40E_PF_ATQBAL; >>> - hw->aq.asq.bah = I40E_PF_ATQBAH; >>> - hw->aq.arq.tail = I40E_PF_ARQT; >>> - hw->aq.arq.head = I40E_PF_ARQH; >>> - hw->aq.arq.len = I40E_PF_ARQLEN; >>> - hw->aq.arq.bal = I40E_PF_ARQBAL; >>> - hw->aq.arq.bah = I40E_PF_ARQBAH; >>> - } >>> + hw->aq.asq.tail = I40E_PF_ATQT; >>> + hw->aq.asq.head = I40E_PF_ATQH; >>> + hw->aq.asq.len = I40E_PF_ATQLEN; >>> + hw->aq.asq.bal = I40E_PF_ATQBAL; >>> + hw->aq.asq.bah = I40E_PF_ATQBAH; >>> + hw->aq.arq.tail = I40E_PF_ARQT; >>> + hw->aq.arq.head = I40E_PF_ARQH; >>> + hw->aq.arq.len = I40E_PF_ARQLEN; >>> + hw->aq.arq.bal = I40E_PF_ARQBAL; >>> + hw->aq.arq.bah = I40E_PF_ARQBAH; >>> } >>> >>> /** >>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h >>> index 9fda0cb6bdbe..7eaf8b013125 100644 >>> --- a/drivers/net/ethernet/intel/i40e/i40e_type.h >>> +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h >>> @@ -64,9 +64,7 @@ typedef void (*I40E_ADMINQ_CALLBACK)(struct i40e_hw *, struct i40e_aq_desc *); >>> enum i40e_mac_type { >>> I40E_MAC_UNKNOWN = 0, >>> I40E_MAC_XL710, >>> - I40E_MAC_VF, >>> I40E_MAC_X722, >>> - I40E_MAC_X722_VF, >>> I40E_MAC_GENERIC, >>> }; >>> >>> @@ -588,12 +586,6 @@ struct i40e_hw { >>> char err_str[16]; >>> }; >>> >>> -static inline bool i40e_is_vf(struct i40e_hw *hw) >>> -{ >>> - return (hw->mac.type == I40E_MAC_VF || >>> - hw->mac.type == I40E_MAC_X722_VF); >>> -} >>> - >>> /** >>> * i40e_is_aq_api_ver_ge >>> * @hw: pointer to i40e_hw structure >>