From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B9CDA055E; Fri, 27 May 2022 15:17:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C053640E78; Fri, 27 May 2022 15:17:05 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 2244740E5A for ; Fri, 27 May 2022 15:17:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653657424; x=1685193424; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=d2FVSpv/t/upN/noOFFzt3uUXUK+8fCjzJLzTh8uct0=; b=QbWThLDM3wqjv6z6t8Wc2ItoIdA/4H0btIaw9GQ7VIpVsXFCuzYHNTZF X99Ya4SpHekw8a5rQvYP2FCLYjuDe1+PtOqDHDH8gO7yo3Ydl7F3dx3uv 9ftTmWci4ZQIILNWLWVlNovJd4CH7AaNeMqUE5bzEkX4jB9sTw3W8SB2m CeMXp9+M+SPsJBD3Vwiq6ntZf4s8PQM6Bpd0kIOyWiKwZn9Jw8LY4T1NU wfw0GlCiyOwmhLC8me7FjSTri9GpQIfMEAxgDzpXH3BGcs7dyAw0klJu9 UiEOKIthPT6vjtCVpgccDUIpZkkCgVnYxN/ZhS1qnT/rj5bK5kvfG3xQ7 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10359"; a="299819824" X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="299819824" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2022 06:16:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,255,1647327600"; d="scan'208";a="603878341" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga008.jf.intel.com with ESMTP; 27 May 2022 06:16:56 -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.2308.27; Fri, 27 May 2022 06:16:56 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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.2308.27; Fri, 27 May 2022 06:16:56 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 27 May 2022 06:16:56 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.102) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 27 May 2022 06:16:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aX1a4G1I8uoXax0TmYgyl3TY+JvUMYEvJ1MBFulimKSCZNvI/7FuAVbojzFwrCrxRhP6yYTt4wD10XPeHLFiAu1EgQ7CCi0fy6QzgoMmWiQLPzdgR6pNxaYGvOzlrUXHxKcibyDTc2Z/wMqnn7a3ILyCA0IKXx2we7yLkLwTCtHYsEIz/1EIGVoJcPJ0rC0+4OR/y6apKd+oV5Z0EoASrMB+eQMmlNHXmPqqlUzjRjaTr3xXq0PzwiMgzsMXQsyp5xOKN1i8OjoEYIAV8f6ZrWpUd1NW9Wn6HRSxw0cCZpgfj8DZd6yREW03quZmu+VkCLi9HS/wWMGczhQd7nKISQ== 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=6wNbpQLyAdvvrEmLPrlrqfjGxazOUxDmo/WfdfHWbqY=; b=kRhsBtGGnlEIlwl/5PhZ9uxBMAk9l8iC82hMDFwM+s30GlLYo0GYMsqSNJkcV6qJ5RVkIhIkg8n6LJGHikFzl/gUGWpMJls0wCRhHMC7FFOIA8xepgqqokpZw8VFwDwQ6Q/8j7V7L0t02rJ0pkbiEvqE6cqVGnfGej32zi3qPmvLCWqpHyq1A2RmGJyGXgOg9eXOezHyhFyuVTJ4t0r+BhbgeHW4/1j7z9oLhIAvdKnwrBoNqRc4SaeIggEU2o4XsGerCpdcULvPiQNLrlh3n5fHxTYTpwlZI7vNLkT0OG+1A4XOiSOXhv8hSMutsCbCdVbgVOJfo/PrHTZjDP7iAA== 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 SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by CO1PR11MB4898.namprd11.prod.outlook.com (2603:10b6:303:92::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Fri, 27 May 2022 13:16:53 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::6555:fdc:d62a:9540]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::6555:fdc:d62a:9540%4]) with mapi id 15.20.5293.013; Fri, 27 May 2022 13:16:53 +0000 Message-ID: Date: Fri, 27 May 2022 14:16:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH 1/1] lpm: add a scalar version of lookupx4 function Content-Language: en-US To: =?UTF-8?Q?Stanis=c5=82aw_Kardach?= CC: Michal Mazurek , dev , Frank Zhao , Sam Grove , "Marcin Wojtas" , , Bruce Richardson References: <20220510115824.457885-1-kda@semihalf.com> From: "Medvedkin, Vladimir" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0083.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::23) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 354cba25-1186-41f2-2be3-08da3fe32a97 X-MS-TrafficTypeDiagnostic: CO1PR11MB4898:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pzxJYxfSpXDV1x+1tiJ8yE4ehNTWd6LaB7lfXtdNkCvClqt3/Z6+8DRgrKyNlbTDEAVH/Vkwf5ZBGl7wdr0St46SnRPHuXN5s86xPhNskVzLFWYaFu6N0BDTpnBM2CnLYFZ6Jm++dsaAvIc7kL5dezSulSb9LlGcKpygYW7oTBC6ph36zY7Jw36y166dq3iUfwsOQc6BeRA5JkZLfrpl8bRt2jehOpzRXwzQnBKkKM5xTFPjfbSEkDLXuzqSP/YrABTTwJMtVPtiMLkB3oTBTaq22ZEiArooL8fmAX/OaxPkRHMmDxFVcaSdwX0v0GKyUI7vk8G3D0aIgpHZvC4vrV71LnzN9Pv3I9ce6I/DHXXCD0FUXzgpSedKVYId31C7BQ/DTrtDd5epFv10yOoSi6Y+DrfuJXcAAS2oIQYYqd76YwZRLkaI4bZ0vpJjpTS6VNsWzWclWGM51BL8e7bLnosLYI6FTvDxVvm+mZgVCF7Ps2H3JaVksSjU2kMtUBofmPtLd20Ly5DIL0LIAskYCdSpho8Z7O1qrwudWFNuUNrBV0OhhWAWTOi834hVhrif4wRe8cFNofxz3RxhmlNLe6imRf11HxIHStSZZJO6Tn+sK4qClAXY6oFHQYdhq136k+551k+zI8zU+++pXfZgWK0QlYGwOGiSXOcGmSQlZ/XqsxrLp+s/SiKuzg06KPVJ4fvOP6FDFPMrlyFvGLa6iO4f2Pzgg7fxb51loouSdqE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6916009)(54906003)(2616005)(107886003)(53546011)(66574015)(6512007)(26005)(6506007)(186003)(6486002)(36756003)(31686004)(508600001)(31696002)(82960400001)(2906002)(8676002)(38100700002)(6666004)(316002)(83380400001)(8936002)(4326008)(66476007)(66556008)(66946007)(5660300002)(86362001)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZWl3WVg0MXppRUQ0bU1qM0hsNStiOVk1a01oNWZLbFRtcWJlcFBMSjRCZFdE?= =?utf-8?B?dXVpQXRVVGI2Y3BvajRlblhTdFA1RnY5eVVOVlh6SnRDR3VrOGh5Q3BSaEFo?= =?utf-8?B?bWJHVUNzWjhlU0FJNTBOc3Z4aXNYeGVqbkZnVjZ4akg0bU9NVjE0ZGVLVHVi?= =?utf-8?B?UWhnSENsR1hVc0QwV1hsZFI3dkdENjltanhIUDRCVGpKM0VaVWZtMVVsNXlW?= =?utf-8?B?bW50V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?utf-8?B?WUlidXFVZWRTS041ejZWZHluSUU1aXY2ZUh3akVCTm00MkJ3THdCQ2o3cERu?= =?utf-8?B?dmVZQks3ZkZENUh0R3hrN0hlSngwUGZ6TDdjODZueFJja3NTby9QNU9sQlRj?= =?utf-8?B?enhlclQzQWlDU20ySW4rMy9sZFAzeXIwZU5zZVZNSUovSWp6NmZER3VVcUxm?= =?utf-8?B?QXYwNWMyc0ZoSTJPZWNRdkppMForNGxvaWRFcGpaVXUrTmVUU2RaZzJDS3NV?= =?utf-8?B?clRFbGh1UWRWeHBla3J2NnRHaVJoeEU5WnBKUHJTclRXOWRHeVQ2THBCbW53?= =?utf-8?Q?a96tLYfHO/zy2JbieN4U5Xa638blfQb+gGOgQ?= X-MS-Exchange-CrossTenant-Network-Message-Id: 354cba25-1186-41f2-2be3-08da3fe32a97 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2022 13:16:53.3834 (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: GdiC5Fbxor1Ld5S2DY04XHKHbvgQFt3xftHbQNW8fS382E0gJ6/g023MBFDoxGc6PFoZp+VNNWPsaSC5oO0JJRuFaaaDKWDPC2VPr26n8L8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4898 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi Stanislaw, On 27/05/2022 12:16, Stanisław Kardach wrote: > On Tue, May 24, 2022 at 6:28 PM Stanisław Kardach wrote: > >> That said I wonder why do we have different const requirements for >> rte_lpm_lookup() and rte_lpm_lookupx4(): >> static inline int rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, >> uint32_t *next_hop) >> static inline void rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t >> ip, uint32_t hop[4], uint32_t defv); >> I think both should be const. >> > To re-iterate the question, should I also post a patch for changing > rte_lpm_lookup() to add "const" to "struct rte_lpm *lpm" argument? > rte_lpm_lookup_bulk_func() and rte_lpm_lookupx4() already take lpm as > const. > I'm pushing because otherwise I get a const discard warning in the > scalar version of rte_lpm_lookupx4() utilizing rte_lpm_lookup(). Since these are inline functions, there will be no problems with the ABI/API, so please add const to the *lpm argument. Thanks! > > Best Regards, > Stanislaw Kardach -- Regards, Vladimir