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 402A9A00C5 for ; Wed, 8 Dec 2021 11:37:24 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16DF4406FF; Wed, 8 Dec 2021 11:37:24 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 63505406FF for ; Wed, 8 Dec 2021 11:37:19 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10191"; a="218489546" X-IronPort-AV: E=Sophos;i="5.87,297,1631602800"; d="scan'208";a="218489546" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2021 02:37:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,297,1631602800"; d="scan'208";a="612049190" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP; 08 Dec 2021 02:37:18 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 8 Dec 2021 02:37:17 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 8 Dec 2021 02:37:17 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) 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.2308.20; Wed, 8 Dec 2021 02:37:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=briPELQX+suAenU1bAurlQ3n9hmjQdIVAM39seDysexih+2paxovFKDU16bvtAX8dE+U8sPv/taLe+XoU0hSEfWz7tc4mUOLsD540sQiZMZPbEIIk/+nxQhKCzP+3dA9hthoLnowrJplgnm/h9feRiJl0UDzG9a8i7p3hvipWKYoFnWUYdMBVY6LPgZTqFqlJoc7CZ8GbxBCQTfJqBtgl8tztba6ZnUzkmc24YoZMIspWAdS3+i8na41z8P3pIQvayD70P/rxgbgXXd1q/fScpE0WdAaRdz7hNoFDfjGPQ5cpARSWqe22yXmJRO/86IMWR67gjFSYBEmB389jJG45g== 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=z99ilOLV1R4Ac1cZHV9hZAxBHtgwZ5t1zN0oKt8QM8M=; b=fkRqybiYP2nPBrKJsXjeG1hwse9GjXHMb7CzpxW9EWZ/zmqKrC996kSwyZzhpfyW5xNSvr4QYfU1bdxR686RGz6KDYC8cjE1PQs/OUpEHgi8OdyJen6cF58oXqoYIGbmeEWozyM74J3l+YIVzPPizTWwaU415LuvKrq/K90Y1f1q+sd02o9pJjgY75isoj7zPvxFCag+OHPjpIBtogynP3RHpaVhlBF8s67oGLCm0pqkoYc2jJxQbmQWrN7WnUnoyS9vHUpp6RPbP1CSXpC7yiFlGSg4kbYIR4Xn6O7DIDRpwEfSIJbDdsJPGkhIdrnBPrx/f7Yq/jAJwSYCfRZb2g== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z99ilOLV1R4Ac1cZHV9hZAxBHtgwZ5t1zN0oKt8QM8M=; b=XfynSLaf5kfBj/67nsmOO0GbV42i6ZXn951t8PZWTIk+Q7AOqIjQFJW9eFJwBGUvJArOTQHSnB8xw9RRNi7+QuZeNA4RkFHKrIdiY+H+aMPYeTGLXvPRfHRRwZ/0hCK9qyrt8PZ+fC+7rCVHO3ptFWeMtE/9bl57YLdKCf8XI3I= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5784.namprd11.prod.outlook.com (2603:10b6:510:129::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.14; Wed, 8 Dec 2021 10:37:16 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4778.013; Wed, 8 Dec 2021 10:37:16 +0000 Message-ID: Date: Wed, 8 Dec 2021 10:37:10 +0000 Subject: Re: [20.11] kni: fix build for SLES15-SP3 Content-Language: en-US From: Ferruh Yigit To: "Xueming(Steven) Li" CC: Aman Singh , Longfeng Liang , , References: <20211208103410.835542-1-ferruh.yigit@intel.com> X-User: ferruhy In-Reply-To: <20211208103410.835542-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0072.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::36) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7592e8c8-609a-4956-81fa-08d9ba36b413 X-MS-TrafficTypeDiagnostic: PH0PR11MB5784:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LvFQL1/YnpdvxSwsREGQf28X//P5Aj3+MQem4cJpPOrT0RhfxXDhEmvDdDIkS90rU/I//z/9V3anrW+y6hblWRUpApb+ST9MO8msLbfuDahNiZtKiO7wzG/bAMYA1nrFJXqGSFjchwpcN2lP8oD9b47jZpJVB+SzRm3SfiwOyi0ooPgssBa9MRFuhAqdgjDtLe9yJfcZ/HEU2MHIHVP4n/j3yUmjC/zB2M0loEMC+1cuQFkOsRru+nvUpg2qhEPgIFetaHM4URU2ASVaIzIVx9lldCuhMyaerumsnaEazbfLj11ZDTDOqaugUjsUnSgJ4HCEY1Qxz3OL4+rqkgh5Uo6kaLSjZzQHXZchWG/xTm0ufzmzEJB3JLVw/vZ+XPv31mzVrsxN8WCy0trRR+gAgsycp31wHgAxvhbsRmF3j9vsKk2lOJ7Ky5oQzAKVczXEq5Htx37LTJXXmmpUN8NTsD2qjBlEX3tSBiM0RQouZbNrXtH5xXd3GvdiEn/MqOxLykN23GELMQpesl+ddLuh1y82v4NYIHpOZnedN5bR8b1Vmi5I+ofWahRm03JivO5CtsLI8zwUylovpO4xqsQo6taT4Q4hZgX5yExvr0L5dpVd7LwtVA9/iH2f8Lgt91VA9wNUhMg+6y4EZ/pM2NLtgp/lZDWQ8Hee2krdZ7NGvHjjPQ8P1qlmYfZ1BZqzLfcBalNLooWLJG+/RraGoJQyhoQHyB/LrU9sChCXu38sPP8ZrpNu47Jy5Xr4q+LXOYkXd9jv7ngNK2aqf0gJT9d/2pYbLiA2IhdE4c7RFc1Pb/c= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(6916009)(31686004)(508600001)(38100700002)(4326008)(316002)(54906003)(966005)(5660300002)(53546011)(6506007)(6486002)(66476007)(31696002)(26005)(86362001)(6666004)(66556008)(66946007)(186003)(8676002)(44832011)(36756003)(8936002)(82960400001)(83380400001)(6512007)(2906002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d1d0S2tnTExvZHJMeWRkZ0E4T2tDdG9md3BsQk9Ec25LZFJCSkVZTGtNdklq?= =?utf-8?B?OCswb1JHeVZ3WHo5eE5uUUdMb0J0T0ZwdWZYaitSQndERmdYeXhEa2VRZ3hE?= =?utf-8?B?Vm9TcGhYdjJkWHZBWlE4U0U0TG9SVlpBK2lrV2dkVStOcjB4Szl6T1lBUVNm?= =?utf-8?B?Y3l2bS9Pa3lDUHJCSkpwWU5rTWlCNUw3dXhUdXFKUlkwaDVwRzR3dlU3dEhp?= =?utf-8?B?em5JeVZKWUs2WURIejlqcnA4Y0xiRGQrRWN4WElhNkN6Qm11cXc2WVZvZVBR?= =?utf-8?B?Nys3S3lBRFZFeWtvSlFBRzdMQzYyVnpQUVFxWkhEcUlJVEs5aElJRUpFcDZz?= =?utf-8?B?V0M4RWdZTHhJdndLWHVVQU9yYmpicy9wdFI3bnp1WUNiSjdONnF0b2dmWnFs?= =?utf-8?B?NnZwK0VRWU8yUm9iaHBBbVZQY0UwaERxVTFRLzNTVHN3eHorTDB2bkhmcEUz?= =?utf-8?B?SVhOYmRZVXRqeUpmZmFVV2JJOFVDVytxL3ZEUkdGZ1NlbVFXeXE4THRDNFFl?= =?utf-8?B?ejYrVTJxTTZ6RFFCK2hqVnJVaG45R0ptU25Yc2paSGw2bkorQX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ZadGUxUW5INzloR3hmN3c4ZEVtY1VyRGY1?= =?utf-8?B?WkViV0JUdjJpcGU5ajFsSUl0VEJVSmVzeGJ3ZUdyTTZDNFpZdWFCSXdKSlUy?= =?utf-8?B?elMyTEdxdUxZSkZMT2l2RVhsYkFhOWQ3aXlPTjU0cU1rSVowTDhZd1BnWTdV?= =?utf-8?B?NENvSGYzWVd4RG9oeDFTN3ZsN1MxTVBFbEtQbmg5aHBpek9sOEdhMXpCVkFx?= =?utf-8?B?eGlqZENvcEwrTnJNS0JnT2Z1ZENIeXhEQml6UWlRdC9oa211OGc2TVUvS0Qx?= =?utf-8?B?bGVOVS9qeG15ZmhWYTdlWXlDTGJqNnFlWEdWMnJJODRtM0JZZUlUSEcyRlNB?= =?utf-8?B?dkZYK1FXUHBaNWV3VnV1TTZoOGN0SDRRNmVFNGM2M3IybXAvZFNLd2pEZ25N?= =?utf-8?B?d2laRXo4aWdsZ2Q0YUJHK05uYU4rZFhpa1k1L0NsNTNJSmJYeGxvaWxreU95?= =?utf-8?B?MFlDYWxRVnhyQ1h4d1BneEpNRTZMVy84SGJoZkRjQnZZZk5xYklmQk0wTXhs?= =?utf-8?B?RkNlaW9remFZajhKbkxTWm8wUjIwWWl1UVZHZ0JaSmlSUm5yWlJTdW51UXNx?= =?utf-8?B?cThUSUZ0WUhiKy9QWVU1WUNDYW4zRFY3WXZVRGpoVlhqZ1RhMWdOdERYTGpU?= =?utf-8?B?QXY1Q0ZITEU2TGZCMSt2Q1UrZzB1UkdTUVF2RzNzMHQrVXcybUg3VDAwVlRZ?= =?utf-8?Q?ObKjAJUxFxhPJacr7BJroIk=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7592e8c8-609a-4956-81fa-08d9ba36b413 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 10:37:16.4481 (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: KDsgq+g4SZPDWE6ULXtPbISZNUz2I7g1UjKfpnfVkNZHEVSLg9+AmLI1exwYA9nlzWdE0laSuKSEjui7B4Nq+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5784 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 12/8/2021 10:34 AM, Ferruh Yigit wrote: > From: Aman Singh > > [ upstream commit c28e2165ec360c39ea0e3a0c02b4229966697384 ] > > As suse version numbering is inconsistent to determine Linux kernel > API to be used. In this patch we check parameter of 'ndo_tx_timeout' > API directly from the kernel source. This is done only for suse build. > > Bugzilla ID: 812 > Cc: stable@dpdk.org > > Signed-off-by: Aman Singh > Acked-by: Ferruh Yigit > Tested-by: Longfeng Liang > --- > Cc: yux.jiang@intel.com > > @Yu, can you please test the patch on SLES15-SP3, I am sending the > backport without testing it on SUSE. Hi Xueming(Steven), Can you please consider this build fix for -rc2 when Yu verifies it? > --- > kernel/linux/kni/compat.h | 3 ++- > kernel/linux/kni/meson.build | 14 +++++++++++++- > kernel/linux/meson.build | 6 ++++++ > 3 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h > index 5f65640d5ed2..664785674ff1 100644 > --- a/kernel/linux/kni/compat.h > +++ b/kernel/linux/kni/compat.h > @@ -133,7 +133,8 @@ > > #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || \ > (defined(RHEL_RELEASE_CODE) && \ > - RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE) > + RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE) || \ > + (defined(CONFIG_SUSE_KERNEL) && defined(HAVE_ARG_TX_QUEUE)) > #define HAVE_TX_TIMEOUT_TXQUEUE > #endif > > diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build > index 07e0c9dae727..0eedbd6cb10e 100644 > --- a/kernel/linux/kni/meson.build > +++ b/kernel/linux/kni/meson.build > @@ -1,6 +1,17 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2018 Luca Boccassi > > +# For SUSE build check function arguments of ndo_tx_timeout API > +# Ref: https://jira.devtools.intel.com/browse/DPDK-29263 > +kmod_cflags = '' > +file_path = kernel_source_dir + '/include/linux/netdevice.h' > +run_cmd = run_command('grep', 'ndo_tx_timeout', file_path) > + > +if run_cmd.stdout().contains('txqueue') == true > + kmod_cflags = '-DHAVE_ARG_TX_QUEUE' > +endif > + > + > kni_mkfile = custom_target('rte_kni_makefile', > output: 'Makefile', > command: ['touch', '@OUTPUT@']) > @@ -16,7 +27,8 @@ custom_target('rte_kni', > command: ['make', '-j4', '-C', kernel_dir + '/build', > 'M=' + meson.current_build_dir(), > 'src=' + meson.current_source_dir(), > - 'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' + > + ' '.join(['MODULE_CFLAGS=', kmod_cflags,'-include ']) > + + meson.source_root() + '/config/rte_config.h' + > ' -I' + meson.source_root() + '/lib/librte_eal/include' + > ' -I' + meson.source_root() + '/lib/librte_kni' + > ' -I' + meson.build_root() + > diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build > index 5c864a465344..76eb279d9e59 100644 > --- a/kernel/linux/meson.build > +++ b/kernel/linux/meson.build > @@ -15,6 +15,12 @@ if kernel_dir == '' > kernel_dir = '/lib/modules/' + kernel_version > endif > > +kernel_source_dir = get_option('kernel_dir') > +if kernel_source_dir == '' > + # use default path for native builds > + kernel_source_dir = '/lib/modules/' + kernel_version + '/source' > +endif > + > # test running make in kernel directory, using "make kernelversion" > make_returncode = run_command('make', '-sC', kernel_dir + '/build', > 'kernelversion').returncode() >