From patchwork Sun Aug 11 22:31:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_M=C3=A4tje?= X-Patchwork-Id: 13759898 X-Patchwork-Delegate: stephen@networkplumber.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2138.outbound.protection.outlook.com [40.107.247.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E6EA18E06 for ; Sun, 11 Aug 2024 22:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.138 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723415502; cv=fail; b=qTdGsj7dyOAvsqbxw1gn5F8YishS+ACaZmOl2eoervFZhXF//ABAu4gVMfdCwpXPEnY5SSCdrTl4KreeNxulZr+Alb25uhTTTdZT3tHBHP7VnGu0BSmKnnqLBN8SFd+n2jjM82aoBzLpskyg4kusR2x7o2AzGWn2Fne7hkC8XCs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723415502; c=relaxed/simple; bh=ZGoIOvvCAaKY12YWMasPOLYbCNWsmMAtC3qoxM47+e8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=oGe9nup9IX39SB8rfeBjL9FL1e8tFAFuddboZ2CKl8Ns+h8lYfEO947uN2ofXhuFmtZykQqxNKbVCsr0E30vMnX9j4pQQbr26vQD/hEmMnFaOWrB0TkFM3Th3u7wl7Nq0kHv29JA43tX45+ds4Nv3bC4ocVwMgGEjDgoYYLi8To= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=esd.eu; spf=pass smtp.mailfrom=esd.eu; dkim=pass (1024-bit key) header.d=esdhannover.onmicrosoft.com header.i=@esdhannover.onmicrosoft.com header.b=vCDr6Fnr; arc=fail smtp.client-ip=40.107.247.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=esd.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=esd.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=esdhannover.onmicrosoft.com header.i=@esdhannover.onmicrosoft.com header.b="vCDr6Fnr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TOVqegovH+h/936qdYfU35QI2FfJlqC7d8E22XHYmamh9YZWr53b5P0vQ2DNgea9BqaDW/cRxyhOiD1VHi4gHaCyJVNKcm+sP0efocdILZIEoiW36sC+4sSiNThuJk2zd6Nh9nBWbyYxdRrhJHqrZT32sXxt5B2UoPBbcQ+3s3L41WIAViZG5bXhZ8PSFSToW7Gq4jrlPFBbfrKe+gn2S4/PG5W0s5h5dWxftw4BY33psNz9JkRI3NniK1F+2tqXfw0EBVAnpFF+/hieQnqcFEnnW50ZHhN150hgvyvx8pdDSklxLc/yexoDgv5KlMqFX2XlXqYa8uQ9p4ApxF6rsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=jVvb1tU1LuMEtRcVouoxWmHbYZ5TlXNeoLghZblzkj8=; b=jSPTYfoVMMMzSR6lY6qKoVTZWhq3TJZIT5PgC40N5wxYl55CdOmRMRXRy5RzwToOkAd+uORjvFeky9g9xLrnuQ2x39t6BNPrZrg3jK7tKcpdJ9TX/vXbc1JMLgrQuqiCiKlGsdGC9/vTx+a4syEFNiyytYyY8wgPsv825wNH0geslv3d8CjrZfz9pkQ+Nw7mBfLU8F/KtYpmD9VwFlLsx4A1CvU7p+5GphthIWoKsJALaqJF8mfIahfZy6o4VaFL/Q666fJXVrTnFQMQqtd1d73nszBRgv27D589PHUMKGfLIoHD7uU3MDvnbnN29QZXOxluD7STf80/SeLir+KfXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 80.151.164.27) smtp.rcpttodomain=gmail.com smtp.mailfrom=esd.eu; dmarc=fail (p=none sp=none pct=100) action=none header.from=esd.eu; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=esdhannover.onmicrosoft.com; s=selector1-esdhannover-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jVvb1tU1LuMEtRcVouoxWmHbYZ5TlXNeoLghZblzkj8=; b=vCDr6FnrTFgkb7/r1/DjiYnpRJlymtyob+zNfssAv7tILBSEvLnGoQwCnV0pUYdusof/upVYyUl+CyST7QIvBl12YE66XaBs5OgDvDnBucRpCfkOPPbzWm/p7/4oJ0ytG0Yy5QoGaR80QSvINvhdiMoGdbyBu5mA12TbjXgf+5g= Received: from AS4P251CA0027.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::13) by DB9PR03MB7756.eurprd03.prod.outlook.com (2603:10a6:10:2cd::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.15; Sun, 11 Aug 2024 22:31:36 +0000 Received: from AM4PEPF00027A66.eurprd04.prod.outlook.com (2603:10a6:20b:5d3:cafe::55) by AS4P251CA0027.outlook.office365.com (2603:10a6:20b:5d3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20 via Frontend Transport; Sun, 11 Aug 2024 22:31:36 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 80.151.164.27) smtp.mailfrom=esd.eu; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=esd.eu; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning esd.eu discourages use of 80.151.164.27 as permitted sender) Received: from esd-s7.esd (80.151.164.27) by AM4PEPF00027A66.mail.protection.outlook.com (10.167.16.91) with Microsoft SMTP Server id 15.20.7849.8 via Frontend Transport; Sun, 11 Aug 2024 22:31:36 +0000 Received: from debby.esd.local (debby [10.0.0.190]) by esd-s7.esd (Postfix) with ESMTPS id E78637C16C8; Mon, 12 Aug 2024 00:31:35 +0200 (CEST) Received: by debby.esd.local (Postfix, from userid 2044) id D50182E47F7; Mon, 12 Aug 2024 00:31:35 +0200 (CEST) From: =?utf-8?q?Stefan_M=C3=A4tje?= To: David Ahern Cc: netdev@vger.kernel.org Subject: [PATCH 1/2] configure: provide surrogates for possibly missing libbpf_version.h Date: Mon, 12 Aug 2024 00:31:34 +0200 Message-Id: <20240811223135.1173783-2-stefan.maetje@esd.eu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240811223135.1173783-1-stefan.maetje@esd.eu> References: <20240811223135.1173783-1-stefan.maetje@esd.eu> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM4PEPF00027A66:EE_|DB9PR03MB7756:EE_ X-MS-Office365-Filtering-Correlation-Id: c9cbfbef-90bb-43bb-6b25-08dcba555c3b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?DkFcmQTB0Ekh3kN+vX8ZA9YvD/tx/av?= =?utf-8?q?9hT+h9RkgcsBvDfkTLe2KS7r5Wdm8WZkxLcew48lS2K66HsZfWpI8G8wB5qPzftyO?= =?utf-8?q?QG2TWs/VgSLkzYzAxOBIdsbaT/JSLd3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u37cRcEtt0PwIIL43+RfBTQK?= =?utf-8?q?JXvnt9i4ZOq6AUTucNDCzWa4OV+YIdopqpFcy2nGhynGQhMu9k5TE2wy72AXyCIIt?= =?utf-8?q?WW/F+/c/xK7RYD11CGpBQLcx8FPantUWl3TxexPJydvH2fI5S0BniQ5K3B8hoF/KK?= =?utf-8?q?GkbyEVRtVdVyMyRLV/UUPZEdJxfNOcMaNGm7k2nmOph5dghFSYmO3n4L5ZpxIguYF?= =?utf-8?q?rRrReM5ol64hGD8XhuKpnO3PzNaFiwyzhW+DtP1dO22tFRplV1kyxiiSPvhSQq2IJ?= =?utf-8?q?BAPQE704L98wQ6CjSYO/VqpP9k7ZesXuwQrxUV378YmK525hwaMivahayLv0uT3tw?= =?utf-8?q?++4QDqQBUHQJSY4fAj0baH62vUF1ypRbl2OyQOIY2ZvRzLWCkA/sTeHNMGKugflqx?= =?utf-8?q?yMlCo91nK0v?= X-Forefront-Antispam-Report: CIP:80.151.164.27;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:esd-s7.esd;PTR:p5097a41b.dip0.t-ipconnect.de;CAT:NONE;SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1102; X-OriginatorOrg: esd.eu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2024 22:31:36.1371 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9cbfbef-90bb-43bb-6b25-08dcba555c3b X-MS-Exchange-CrossTenant-Id: 5a9c3a1d-52db-4235-b74c-9fd851db2e6b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5a9c3a1d-52db-4235-b74c-9fd851db2e6b;Ip=[80.151.164.27];Helo=[esd-s7.esd] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00027A66.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB7756 Old libbpf library versions (< 0.7.x) may not have the libbpf_version.h header packaged. This header would provide LIBBPF_MAJOR_VERSION and LIBBPF_MINOR_VERSION which are then missing to control conditional compilation in some source files. Provide surrogates for these defines via CFLAGS that are derived from the LIBBPF_VERSION determined with $(${PKG_CONFIG} libbpf --modversion). Signed-off-by: Stefan Mätje --- configure | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure b/configure index 928048b3..7437db4f 100755 --- a/configure +++ b/configure @@ -315,6 +315,12 @@ check_libbpf() echo "HAVE_LIBBPF:=y" >> $CONFIG echo 'CFLAGS += -DHAVE_LIBBPF ' $LIBBPF_CFLAGS >> $CONFIG echo "CFLAGS += -DLIBBPF_VERSION=\\\"$LIBBPF_VERSION\\\"" >> $CONFIG + LIBBPF_MAJOR=$(IFS="."; set $LIBBPF_VERSION; echo $1) + LIBBPF_MINOR=$(IFS="."; set $LIBBPF_VERSION; echo $2) + if [ "$LIBBPF_MAJOR" -eq 0 -a "$LIBBPF_MINOR" -lt 7 ]; then + # Newer libbpf versions provide these defines in the bpf/libbpf_version.h header. + echo "CFLAGS += -DLIBBPF_MAJOR_VERSION=$LIBBPF_MAJOR -DLIBBPF_MINOR_VERSION=$LIBBPF_MINOR" >> $CONFIG + fi echo 'LDLIBS += ' $LIBBPF_LDLIBS >> $CONFIG if [ -z "$LIBBPF_DIR" ]; then From patchwork Sun Aug 11 22:31:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_M=C3=A4tje?= X-Patchwork-Id: 13759900 X-Patchwork-Delegate: stephen@networkplumber.org Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11021098.outbound.protection.outlook.com [52.101.70.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50E4F157467 for ; Sun, 11 Aug 2024 22:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.98 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723415504; cv=fail; b=ex3BjJ4c1ksIgvNTy6PzGcHa++6pUpDbB025iD72JvqockLOzeC/8Ey6hpq/iWyVw8K/SXkFjvS36+7lcg6oVuNiGJkReDRihhn52JN7+v8E3rJx9Gi9/MmPlWNO2Skq9OxS/dcfvRlb2u2NNB+xwz/klhPa81t+HpEOHswUfcA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723415504; c=relaxed/simple; bh=RV/WreNB83bncpMEWO60BcPB2Fuya41geQin6BiC94g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=biNHl0yJV3KmFvZio3qyw3Ce6nGKib88p4eCTjclr1kuxyU5/xf6pr7b8Z2HidfHB0TJmQuh3n0MIgy10IuP2yttlDOFgwQupA77vtnxXTFs5fUBvUr06VIthHc0ujiBwFmwKmTK2n6aki78drbvrt0U3na+BMBumKfQ4vep6aM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=esd.eu; spf=pass smtp.mailfrom=esd.eu; dkim=pass (1024-bit key) header.d=esdhannover.onmicrosoft.com header.i=@esdhannover.onmicrosoft.com header.b=Drozbat7; arc=fail smtp.client-ip=52.101.70.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=esd.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=esd.eu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=esdhannover.onmicrosoft.com header.i=@esdhannover.onmicrosoft.com header.b="Drozbat7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H5qZHnRr1qOiixmSD5eK3sOzilj21a9vPL+m0eNgM246e4MoI80u/uPXiy7fQQVUNmhT4/lCjlDQq0TfKnPMlTbKsTmRlbzSfI7t0oqHbqa6AT9TfidwlTJtGX9zCa9uoiBRQ46ZFk8vfhZc3zpUCwsVhwI2oXS2gB4lyxo2jHZHhCVnGy9NcjQ5tXyYCoMTIT8fpLjmthHNLlsf2gU8/owxsTTnzqFWjWNBgyWZvLfdYDXIZdXLMd2XU1Y6jpbVtVv1RKUTaPcBMf6DjsfemnDkKTY7hO0/jxQ1309l9v6xPp2gLdFBZdsgcyZTCQILzegKsbX4r1O/2GqTBG4j/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=7aa1T/Ao+sNjbiUp6f24HdPzi4sjRH7qvE9ObuvmUUk=; b=ci3mQl49pQveoiHs2WscKDSKcnj3OAftdbZBbZczB+3/aog57N3UgXN+G0ZHf1C7ezc3uXFnfkO8IvZHjb2QsP7ZZP7jIt2sOTjRz7mZROW6vKNjX+9nYRiKqcO+hLxCjtdlwpAh0zwWs4DmFV1T2Nvubrodgo6mlVkyfG1fI2gcBUv2fFParFvrCvtYsdgVcoND8FxFTYwCJIVi9h9X12QjixVjnctIcElAjcXx8cGNfGaOwd8Y6vxYy3PiN/VRt3piJ5hmfI8/sjAedItybIhRulyennavLU3JuElsYY1kkcd7kX7m3JbMNcNk3TtiZHxwTw+zSWD9bkjEegPweQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 80.151.164.27) smtp.rcpttodomain=gmail.com smtp.mailfrom=esd.eu; dmarc=fail (p=none sp=none pct=100) action=none header.from=esd.eu; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=esdhannover.onmicrosoft.com; s=selector1-esdhannover-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7aa1T/Ao+sNjbiUp6f24HdPzi4sjRH7qvE9ObuvmUUk=; b=Drozbat7u7T3D2cbq17U6xCSLpHD8ljoHOCU50VOsFKQjJ4IkJNXq2nt6a+VV4p3l6leydekhwyoFBjQ8kNB4DHRaI375apbTfRPn9tEXAQOiVtR4Bp0Swn1P3ydUwLfvn0MzhzKnKdWVpLofxRl5eDRI6wUseqcNCArkfqWXC0= Received: from DU2PR04CA0337.eurprd04.prod.outlook.com (2603:10a6:10:2b4::35) by AS2PR03MB9879.eurprd03.prod.outlook.com (2603:10a6:20b:547::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Sun, 11 Aug 2024 22:31:36 +0000 Received: from DB1PEPF0003922E.eurprd03.prod.outlook.com (2603:10a6:10:2b4:cafe::bd) by DU2PR04CA0337.outlook.office365.com (2603:10a6:10:2b4::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20 via Frontend Transport; Sun, 11 Aug 2024 22:31:36 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 80.151.164.27) smtp.mailfrom=esd.eu; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=esd.eu; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning esd.eu discourages use of 80.151.164.27 as permitted sender) Received: from esd-s7.esd (80.151.164.27) by DB1PEPF0003922E.mail.protection.outlook.com (10.167.8.101) with Microsoft SMTP Server id 15.20.7849.8 via Frontend Transport; Sun, 11 Aug 2024 22:31:36 +0000 Received: from debby.esd.local (jenkins.esd.local [10.0.0.190]) by esd-s7.esd (Postfix) with ESMTPS id E7CE27C16CB; Mon, 12 Aug 2024 00:31:35 +0200 (CEST) Received: by debby.esd.local (Postfix, from userid 2044) id D8F4C2E488E; Mon, 12 Aug 2024 00:31:35 +0200 (CEST) From: =?utf-8?q?Stefan_M=C3=A4tje?= To: David Ahern Cc: netdev@vger.kernel.org Subject: [PATCH 2/2] ss: fix libbpf version check for ENABLE_BPF_SKSTORAGE_SUPPORT Date: Mon, 12 Aug 2024 00:31:35 +0200 Message-Id: <20240811223135.1173783-3-stefan.maetje@esd.eu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240811223135.1173783-1-stefan.maetje@esd.eu> References: <20240811223135.1173783-1-stefan.maetje@esd.eu> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF0003922E:EE_|AS2PR03MB9879:EE_ X-MS-Office365-Filtering-Correlation-Id: df30d9de-ba47-48d6-6e2f-08dcba555c56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?K75ndUyuXEWnoRCSkIk0FvWl6EIP2rd?= =?utf-8?q?/rB6Ni6DiTGqXnJu4dGvvt5C1B2Si/hzmGASLosyVDXsKak06u+ldSh/j5usXsVav?= =?utf-8?q?vEeBw5zy18d8Gc2SERjhmp4DrxstfVVj3OwBG8VlboHCuOoB5i7hJ46QDwO2AoJ9G?= =?utf-8?q?q3DoU4wabAurSGQYBw0eXBeL5NlUbyBRTOVsh7gDI0dXXJwdXCD82jM884r9oWoef?= =?utf-8?q?BdZwsH74QrMJeEIqX2vEVRGiHwbr5h4hydHi9B6wrMfi7UDeQIR24dD0scCmiGaJ8?= =?utf-8?q?OvAXHFXSYGj1yZ/a+6Riy3cB8X90RQdkZA2ptE12XJ3oP5i2lNdQy6EHbHHf/rJKi?= =?utf-8?q?LNQ8Bd/odLkxGzXk07BGv0zU+7u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Dw28ln/xRBwmoQyhgV3vTgMQjfn8pg?= =?utf-8?q?CCPKEtGC7BoIpypwXA7Am1hwEYQXGqDducmQ6AUjcxx5BzsZYIx+i/iEw6TMbJ6PM?= =?utf-8?q?SBVODkZycC5nxUY6xIWSLrhOxheDlz5nLXnARXF5jJLCAWUT7doBXriMs4HuS79eS?= =?utf-8?q?+3TrmBpg/9Q?= X-Forefront-Antispam-Report: CIP:80.151.164.27;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:esd-s7.esd;PTR:p5097a41b.dip0.t-ipconnect.de;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1102; X-OriginatorOrg: esd.eu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2024 22:31:36.2828 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df30d9de-ba47-48d6-6e2f-08dcba555c56 X-MS-Exchange-CrossTenant-Id: 5a9c3a1d-52db-4235-b74c-9fd851db2e6b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5a9c3a1d-52db-4235-b74c-9fd851db2e6b;Ip=[80.151.164.27];Helo=[esd-s7.esd] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF0003922E.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR03MB9879 This patch fixes a problem with the libbpf version comparison to decide if ENABLE_BPF_SKSTORAGE_SUPPORT could be enabled. - The code enabled by ENABLE_BPF_SKSTORAGE_SUPPORT uses the function btf_dump__new with an API that was introduced in libbpf 0.6.0. So check now against libbpf version to be >= 0.6.x instead of 0.5.x. - This code still depends on the necessity to have LIBBPF_MAJOR_VERSION and LIBBPF_MINOR_VERSION defined, even if libbpf_version.h is not present in the library development package. This was ensured with the previous patch for the configure script. Fixes: e3ecf048 ("ss: pretty-print BPF socket-local storage") Signed-off-by: Stefan Mätje --- misc/ss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/ss.c b/misc/ss.c index 620f4c8f..aef1a714 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -53,7 +53,7 @@ #include #ifdef HAVE_LIBBPF -/* If libbpf is new enough (0.5+), support for pretty-printing BPF socket-local +/* If libbpf is new enough (0.6+), support for pretty-printing BPF socket-local * storage is enabled, otherwise we emit a warning and disable it. * ENABLE_BPF_SKSTORAGE_SUPPORT is only used to gate the socket-local storage * feature, so this wouldn't prevent any feature relying on HAVE_LIBBPF to be @@ -66,8 +66,8 @@ #include #include -#if (LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 5) -#warning "libbpf version 0.5 or later is required, disabling BPF socket-local storage support" +#if ((LIBBPF_MAJOR_VERSION == 0) && (LIBBPF_MINOR_VERSION < 6)) +#warning "libbpf version 0.6 or later is required, disabling BPF socket-local storage support" #undef ENABLE_BPF_SKSTORAGE_SUPPORT #endif #endif