Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1876068rda; Tue, 24 Oct 2023 06:12:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeIgBaTOY1QHqxVBnuQJuJcbaStuWcT763U9Bftvk+oQi5TlslOGPyww1GtgRLvS2vBV+I X-Received: by 2002:a05:6358:cd04:b0:168:d0a3:202f with SMTP id gv4-20020a056358cd0400b00168d0a3202fmr8690160rwb.15.1698153129423; Tue, 24 Oct 2023 06:12:09 -0700 (PDT) Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j8-20020a63ec08000000b0059b79bf220csi8090049pgh.662.2023.10.24.06.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 06:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QZh7GZER; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 99A18809FEFD; Tue, 24 Oct 2023 06:12:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232073AbjJXNL4 (ORCPT + 99 others); Tue, 24 Oct 2023 09:11:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233153AbjJXNLz (ORCPT ); Tue, 24 Oct 2023 09:11:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9705C1; Tue, 24 Oct 2023 06:11:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698153109; x=1729689109; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=hpdpp5mYC5WNPDwH2YRlg1YnFy/j/+krlqDkb44b698=; b=QZh7GZERx78u5T+XB+b9RRGHYHr4guJEP0cJZ9dsmCIkec42vk6xJLDZ MjtvOzZ83D1aWHuCeZQvav+GAMc7ZmKD0BVewsNviJpmmxheMzPwIU7Lf E1tphsG/rdSgoI6sueUCTpFRebgjwTJoCoUTxQXVRuam1iMumUy2Gu1k+ d6kQgZTjePSrqHGBa2AiF1N5ypFkJvOlIMFJe6H/iEVn7mYXm6cy3g1pB kUaN8tIPrO1WUA920V6BYego92tmtxwNuWID0VUIlaC1xaFLYrp1WMcMt Z/tTqjT1BKsIPijU8/18RgVuJ8dBPlGfzE1rtIb87suAuN4iFD8vdP3/i g==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="389901956" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="389901956" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 06:11:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="751998224" X-IronPort-AV: E=Sophos;i="6.03,247,1694761200"; d="scan'208";a="751998224" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 24 Oct 2023 06:11:15 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 24 Oct 2023 06:11:15 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 24 Oct 2023 06:11:14 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 24 Oct 2023 06:11:14 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 24 Oct 2023 06:11:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbmDElkvMH05bAsb86bTRfIPs2knsMlpiISMAvD9zN78YdohY9taCa6KXJwOXkMoITe2pnoHQ5gfI7jXM2rsVQntIny/eTl4mmsGUHSXdLhTCTY+eJfmsWQ+mvIV6kLMhHc+k0/LofsQtaW2d0Bfj8UBLjy1uN93RKjzGDz3qt7fDA810FOLgJVqvdcmdFWO/Hp+qq7i3NXjrmSqJ0G4df7VtSYqTzoZgHx4WUhaGJtgXHIqXG5rFUvc5SrUBtgXwH/Lh49kx6GgmKC1/issQy5k09VwI+efq78W+L5YNiuaf1WkvAxWjql7MtYZ/fw1wsLXwk/BN6KGc0jgJeKaLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oDq0rmibhifud9pJjCg1S5BNWokkKWSh3dcz+eZs0jw=; b=oY//+kXxwlZLZBFLqYE6lc0CeKzPBuhV0OrC9j2Fr3p+LAjxp3rAMJ0eE6Wl7mDxT8gBJJXct02qF292yGVz0gB5w2zLK0gYb1E6quGzF3CNOCehu/TD4UFERIWmy+vI9ta82AuH0TmZ8fr8WFjhP4E2M8zCUtxmbMXNLA9l8/uyqrhKHQvYL2Cn2Fy9Jwco+UHS+hoYVRwnce6ds+fZY4Dxkucyk38aGRycWeCL0HP+c6Vl/eIeDanUgr+YGrrvuxNQj/0stzLp0+OXOhP/rbMp1LaLFbPpRXpmQLdCzLoE8HRPcZHmHe9mO4TkHSN4K4Fxp3OqO89lsiJQKmRHKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MW4PR11MB5776.namprd11.prod.outlook.com (2603:10b6:303:183::9) by PH0PR11MB7562.namprd11.prod.outlook.com (2603:10b6:510:287::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Tue, 24 Oct 2023 13:11:11 +0000 Received: from MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::71a7:70c4:9046:9b8a]) by MW4PR11MB5776.namprd11.prod.outlook.com ([fe80::71a7:70c4:9046:9b8a%4]) with mapi id 15.20.6907.032; Tue, 24 Oct 2023 13:11:11 +0000 Message-ID: Date: Tue, 24 Oct 2023 15:11:05 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [Intel-wired-lan] [PATCH iwl-next 2/3] i40e: Add other helpers to check version of running firmware and AQ API Content-Language: en-US To: Ivan Vecera , CC: , Jesse Brandeburg , , Eric Dumazet , Tony Nguyen , Jacob Keller , Jakub Kicinski , Paolo Abeni , "David S. Miller" References: <20231023162928.245583-1-ivecera@redhat.com> <20231023162928.245583-3-ivecera@redhat.com> <2aba9a2d-9dfd-49f2-bfec-1ff563a5f017@intel.com> From: Wojciech Drewek In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: WA1P291CA0018.POLP291.PROD.OUTLOOK.COM (2603:10a6:1d0:19::25) To MW4PR11MB5776.namprd11.prod.outlook.com (2603:10b6:303:183::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR11MB5776:EE_|PH0PR11MB7562:EE_ X-MS-Office365-Filtering-Correlation-Id: 731349e1-1e09-4689-edcc-08dbd492b1b2 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RwRPAlEsNOrf2vBwxBv0KjiPhGADwdfo62mxh7u8AVTfJL+dkmFz6+H742iGFPBO2YzmOLmXCEdjizq+IHTZi7oP7AUsuFre8g+RSjNFHFKI6xkq2RhMKZPqhyFt4xL3IZdWgyvDoIa5T6S22/ols84vUV3ap7YO7Y/wlUJ/e5kWzQ9yyQhMu5Goe8cGJMWwhOhjKmjc2aaEIzsbEAiAcbU5SoGd0n26plI+AjtzOIwZvQI+0RW65IdYci3PKdvICseiSLwjNjolh06mFK5DsIpQlPaE3/4uU89/H1hKsgLkIAVVxEXqeqAidkdS1P8ZwtP3851SJzNrtuoEmTb2E8vkKPKeNVdDFW9Thv086b+5XkauOWHaeVN7LiY5oIvyK3YrpojqsrAP7ZMqQ2era07WvMfiIHmIB6oOvacPrk5bNrHgG0ha7KKG/8S+a96zAXf354EY4BIJxEc1g9civWa8t++m6AnQybmbunzpOh3TwHlZ0vQyWCfgWg7xbZIUKCDHL11nWzLSasHxn2iHJg2AYPbe/IumFowISRctEeFtaPsYLVPij4Ut42JlqKtBJK5pRYcr5JXf5PERipThef+dJgszgFT4C/do4QR2CHuTZzmTLJN7VVxVqjMZcmHq62OJJMzrUMVzAHBQYFuieg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5776.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(39860400002)(396003)(366004)(136003)(346002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(83380400001)(31686004)(44832011)(8936002)(4326008)(2906002)(2616005)(36756003)(26005)(41300700001)(478600001)(6486002)(53546011)(38100700002)(8676002)(31696002)(86362001)(82960400001)(54906003)(6512007)(66476007)(5660300002)(6666004)(6506007)(316002)(66556008)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?anZEb2ZaSGNIbGZhVUNpMnJ3aC93ckthSHIxM2JBUDBLNnpHYklnb0EzUm90?= =?utf-8?B?aDZHcm1Tc1JwZ25WUEVUT1VlSzdyZE1nTkpUT3RXMldmY3JRK3ZUMnk3VjEx?= =?utf-8?B?VHdyUTdGOVAvdy9aQUtUY3FnanBJRHQ3YTNGU2pGdkh3dlhuaGhsQU9odTdx?= =?utf-8?B?NCthRzJXQ1BpM3FBVlBBWm03TmVtVmNMSmZ2d09wL1llNE9FaGF2bUlNTHRx?= =?utf-8?B?ejNQMGhEWHNuTGpab2pLa0JNSU1WcDFLVUtFNWVhbGN6NHBZWlU0WmVzNXhz?= =?utf-8?B?WEhXaUZMdDZsZ2FDUys1VnpROWYvT2Y0cGsyL1grd3pJYUx0ajNuSytOYS93?= =?utf-8?B?L1RBSmlZZThuY1NETWp4RXlvdk9VRFBsb25kZ21QWVgyR2ozY2hxdjY1TVVZ?= =?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ant-Network-Message-Id: 731349e1-1e09-4689-edcc-08dbd492b1b2 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5776.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 13:11:11.7375 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PIs85IcYeCkvXp5ATfK1r23Dw+Kw911M9wEHY9BqoLhV7eAqIsCPQ5E2s92yR5gLUPnkPpCbVUSgxBzK1IB6SVfJoG4PDIAYD23pL+FMzJk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7562 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 24 Oct 2023 06:12:03 -0700 (PDT) On 24.10.2023 15:01, Ivan Vecera wrote: > > > On 24. 10. 23 12:24, Wojciech Drewek wrote: >> On 23.10.2023 18:29, Ivan Vecera wrote: >>> Add another helper functions that will be used by subsequent >>> patch to refactor existing open-coded checks whether the version >>> of running firmware and AdminQ API is recent enough to provide >>> certain capabilities. >>> >>> Signed-off-by: Ivan Vecera >>> --- >>>   drivers/net/ethernet/intel/i40e/i40e_type.h | 54 +++++++++++++++++++++ >>>   1 file changed, 54 insertions(+) >>> >>> diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h >>> index 050d479aeed3..bb62c14aa3d4 100644 >>> --- a/drivers/net/ethernet/intel/i40e/i40e_type.h >>> +++ b/drivers/net/ethernet/intel/i40e/i40e_type.h >>> @@ -608,6 +608,60 @@ static inline bool i40e_is_aq_api_ver_ge(struct i40e_hw *hw, u16 maj, u16 min) >>>           (hw->aq.api_maj_ver == maj && hw->aq.api_min_ver >= min)); >>>   } >>>   +/** >>> + * i40e_is_aq_api_ver_lt >>> + * @hw: pointer to i40e_hw structure >>> + * @maj: API major value to compare >>> + * @min: API minor value to compare >>> + * >>> + * Assert whether current HW API version is less than provided. >>> + **/ >>> +static inline bool i40e_is_aq_api_ver_lt(struct i40e_hw *hw, u16 maj, u16 min) >>> +{ >>> +    return !i40e_is_aq_api_ver_ge(hw, maj, min); >>> +} >> It feels a bit off to have those helpers in i40e_type.h. >> We don't have i40e_common.h though so I'd move them to i40e_prototype.h or i40e.h. >> Same comment regarding 1st patch (I know I gave it my tag but I spotted the issue >> while reading the 2nd patch). > > I'm sorry I already submitted v2 and helpers are present i40e_type.h. > I would submit v3 but there is also i40e_is_vf() inline function already present in i40e_type. Would you be OK with a follow-up that would move all these inlines into i40e_prototype.h? Sounds good > > Btw i40e.h is not a good idea as this would bring a dependency on i40e.h into i40e_adminq.c, i40e_common.c and i40e_dcb.c. Got it > > Regards, > Ivan > >