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 D5CBBA0C41 for ; Tue, 30 Nov 2021 17:41:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D084F41170; Tue, 30 Nov 2021 17:41:10 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 2ABAD410F7 for ; Tue, 30 Nov 2021 17:41:10 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 068D33F044 for ; Tue, 30 Nov 2021 16:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290470; bh=5zvW3DNiIVJvcr4lNKnCQH61Odvd7C1G4lPvxu1l9LM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vw3L9rl5A/wbqBGRgSM9nZ1wHB1PWqGAI58GmZ5SL8DlG94AlfEakXwG//6THyWTN Ekg7BKrgARs677UvpC5zgNmCgrDHuuRtHoGZKOfAkbw6rAV9nywMCfyBt70j3cadMI GgrmeWKlYhqSnzeUFFcggjSIxeBtzIi7ZDSQm8XdIa46+4iJCkrIuXWjGl27j8vU38 odJfaTCZwLMZ9ZAGpCSZevuPqcABF2d/FHCuJhZxms+5LMMZQQtKnQyyZa7dbMi3RN XZaVyitPkbC8qzK4AUSDX8NIXwEv1n0F27xIFkPK/zZGIg69oT8SOmBxk4tYhSUUtV mgBOAsl3MX2aQ== Received: by mail-ed1-f70.google.com with SMTP id d13-20020a056402516d00b003e7e67a8f93so17528527ede.0 for ; Tue, 30 Nov 2021 08:41:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5zvW3DNiIVJvcr4lNKnCQH61Odvd7C1G4lPvxu1l9LM=; b=x0Npo9j7UA6HCJ4kYNK1/59AvaM/kxEcpFZ4hbj3xc53P3zdMC/+YPX5uT04Heb8cp 2vt7TF63tq3onEAGa6+C31yBXeKkwSmt2XP5izHPSSL++uHWtS/80+Bc0aypjVcfI9KW QOkFx1m5mj47vq96Avi0b+8U0mT/z5sj/N/XoQKzxhcAhZE4pwDLabHNSFR07noSHnx0 hv6j1jvSpJ5O5TeOqKG7k7hjwLGNOtg2EMRH5tT/l32L7jcGLkuK4fcGqfy8AK5waFbh 0U5L1XB951d5tWMa+vA11A+6hRkmmAZvnNBTEVISjIw2HXn862KkvoBaCOkXzFdk6u8K M7Kw== X-Gm-Message-State: AOAM533uG508iJC6cZ6hFPn3j7SmOdB83s74I1SCsPSSqOoS970561+7 N+jwuktGEhPZnizNSNw/9mc69UGkdA04m7Fz5mnXFfQLg/4JY18BHQg9zlZYA0/VTL/9iti5T/T GDh//lO0/HM0tjhmuxwuNk9Q/ X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr114853edd.250.1638290469616; Tue, 30 Nov 2021 08:41:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqzFBe0V8bJhA4B4NHzyQMWeoCwiY4AxYZIBHSiiZJrGWiwMwNRTEzOigwwI+oJNVsqhrJ/g== X-Received: by 2002:a05:6402:5194:: with SMTP id q20mr114804edd.250.1638290469319; Tue, 30 Nov 2021 08:41:09 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id kx3sm9154519ejc.112.2021.11.30.08.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:41:08 -0800 (PST) From: christian.ehrhardt@canonical.com To: Aman Singh Cc: Ferruh Yigit , Longfeng Liang , dpdk stable Subject: patch 'kni: fix build for SLES15-SP3' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:35:00 +0100 Message-Id: <20211130163605.2460997-96-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/6c8f6b72f28c713a7017d0db9ce95b2377ce4366 Thanks. Christian Ehrhardt --- >From 6c8f6b72f28c713a7017d0db9ce95b2377ce4366 Mon Sep 17 00:00:00 2001 From: Aman Singh Date: Tue, 19 Oct 2021 11:48:41 +0100 Subject: [PATCH] kni: fix build for SLES15-SP3 [ 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 Signed-off-by: Aman Singh Acked-by: Ferruh Yigit Tested-by: Longfeng Liang --- kernel/linux/kni/compat.h | 3 ++- kernel/linux/kni/meson.build | 14 +++++++++++++- kernel/linux/meson.build | 5 +++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 5f65640d5e..664785674f 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 f93e97fa09..679fdf4f51 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/common/include' + ' -I' + meson.source_root() + '/lib/librte_eal/linux/eal/include' + ' -I' + meson.build_root() + diff --git a/kernel/linux/meson.build b/kernel/linux/meson.build index 1796cc6861..cd74739905 100644 --- a/kernel/linux/meson.build +++ b/kernel/linux/meson.build @@ -10,10 +10,15 @@ if get_option('kernel_dir') == '' and meson.is_cross_build() endif kernel_dir = get_option('kernel_dir') +kernel_source_dir = get_option('kernel_dir') if kernel_dir == '' # use default path for native builds kernel_version = run_command('uname', '-r').stdout().strip() kernel_dir = '/lib/modules/' + kernel_version + if kernel_source_dir == '' + # use default path for native builds + kernel_source_dir = '/lib/modules/' + kernel_version + '/source' + endif endif # test running make in kernel directory, using "make kernelversion" -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:11.456823890 +0100 +++ 0096-kni-fix-build-for-SLES15-SP3.patch 2021-11-30 16:50:05.894874293 +0100 @@ -1 +1 @@ -From c28e2165ec360c39ea0e3a0c02b4229966697384 Mon Sep 17 00:00:00 2001 +From 6c8f6b72f28c713a7017d0db9ce95b2377ce4366 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c28e2165ec360c39ea0e3a0c02b4229966697384 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -37 +38 @@ -index c15c78b0b4..c683fc7b36 100644 +index f93e97fa09..679fdf4f51 100644 @@ -56,12 +57,12 @@ - output: 'Makefile', - command: ['touch', '@OUTPUT@']) -@@ -17,7 +28,8 @@ custom_target('rte_kni', - command: ['make', '-j4', '-C', kernel_build_dir, - '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/eal/include' + - ' -I' + meson.source_root() + '/lib/kni' + - ' -I' + meson.build_root() + + 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/common/include' + + ' -I' + meson.source_root() + '/lib/librte_eal/linux/eal/include' + + ' -I' + meson.build_root() + @@ -69 +70 @@ -index 3a00ea954c..0637452e95 100644 +index 1796cc6861..cd74739905 100644 @@ -72,2 +73,2 @@ -@@ -4,6 +4,7 @@ - subdirs = ['kni'] +@@ -10,10 +10,15 @@ if get_option('kernel_dir') == '' and meson.is_cross_build() + endif @@ -75 +76 @@ - kernel_build_dir = get_option('kernel_dir') + kernel_dir = get_option('kernel_dir') @@ -77,11 +78,9 @@ - kernel_install_dir = '' - install = not meson.is_cross_build() - cross_args = [] -@@ -16,6 +17,10 @@ if not meson.is_cross_build() - # use default path for native builds - kernel_build_dir = '/lib/modules/' + kernel_version + '/build' - endif -+ if kernel_source_dir == '' -+ # use default path for native builds -+ kernel_source_dir = '/lib/modules/' + kernel_version + '/source' -+ endif + if kernel_dir == '' + # use default path for native builds + kernel_version = run_command('uname', '-r').stdout().strip() + kernel_dir = '/lib/modules/' + kernel_version ++ if kernel_source_dir == '' ++ # use default path for native builds ++ kernel_source_dir = '/lib/modules/' + kernel_version + '/source' ++ endif + endif @@ -89,2 +88 @@ - # test running make in kernel directory, using "make kernelversion" - make_returncode = run_command('make', '-sC', kernel_build_dir, + # test running make in kernel directory, using "make kernelversion"