From patchwork Thu Jan 21 18:51:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi-Hung Wei X-Patchwork-Id: 1430025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=QbYJ9o6p; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DMBTR6lKJz9sVX for ; Fri, 22 Jan 2021 05:57:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ABC0E86DD4; Thu, 21 Jan 2021 18:57:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pdx4RTg8e+CV; Thu, 21 Jan 2021 18:57:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id F26FD86DBA; Thu, 21 Jan 2021 18:57:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C31D3C08A1; Thu, 21 Jan 2021 18:57:11 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0F27DC013A for ; Thu, 21 Jan 2021 18:57:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E22A3231A1 for ; Thu, 21 Jan 2021 18:57:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id inc6d8-pHG13 for ; Thu, 21 Jan 2021 18:57:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by silver.osuosl.org (Postfix) with ESMTPS id 9BBCD230FE for ; Thu, 21 Jan 2021 18:57:07 +0000 (UTC) Received: by mail-pf1-f178.google.com with SMTP id w14so2075328pfi.2 for ; Thu, 21 Jan 2021 10:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Y5vy7Xmcz52S/d8yFzRphApwP/berZrkcNRGCsMq6o8=; b=QbYJ9o6p2P33yZzrImE0/5B8BJc6TWGu7Zh7IAuwcAlP3cTITFqtEBGdynT+me2Jj/ LkY9NZg0Nv1OYBlRpLIrgUaP/eB8PFlIaOvhymShVRO533fKNkORj6rQ3oH7pU0Q+JCP 5/lmqdJPwyj4EraMCCg05IY634F5jl2l+VRxniSWdw0c/ACpiWjoejFpzZYXv8eLQuWV pQddLZjnKoIDqSUZh5OBVCspfNpqd8ChaFpgUkE8IYwzimmP/ht4zXc6G+PLlBeLAd2h +ulYIsh3env8voz+KibU+7GGYS8vRf/rMT50qVxuYw90dL4ivx09N4Wt2rgATqsTzopi Q0zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Y5vy7Xmcz52S/d8yFzRphApwP/berZrkcNRGCsMq6o8=; b=IqEOlETIpOhuc74bTjzIZSiocW9xc37diWppbhy9AzGEDPW+fuCbCsLLyeT/gpeEXF 7wn0hY87hHg1PSYzFL2T8RPyxaWU6LFB5FBN7cgDbHNIvZwH6CWZyKCcWlE6tCCo1X2i 1wOK0ahxZ3KUJrdnhBR4M4S4kmyJ/bbfnO4OrCVpP0Qk/Oy1b+jRdYoVjVGne9VERaXH bHUMxmzC7XLKnuSwxJME00bOy7Yu1uvd+g0EJrEExqD+V6JjVughe/Diuha82MW3Qvuj S6B/97pE5BGiKgVN/8C0RiegPl3Kd5MoQWwTTmyi/uw3TAXtkFAYdISCoz2JrdOAR5Ux CRdg== X-Gm-Message-State: AOAM530g2AYJawfvzqAAhhg1jBMuagFF9qVD4qgt/sdImYri+ujhIY0h yZjKkr0vAMToMEf2RYkNv5U1kmY3k4k= X-Google-Smtp-Source: ABdhPJyC5Gr1ec8Qgatkgt1QVWFJtCiLpohiONqzW5s6m4osjqJJDGHchMtOPWKSCgmUQgJWWoFoBw== X-Received: by 2002:a65:50c8:: with SMTP id s8mr720042pgp.68.1611255426887; Thu, 21 Jan 2021 10:57:06 -0800 (PST) Received: from vm-01.eng.vmware.com ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id p187sm6145841pfp.60.2021.01.21.10.57.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jan 2021 10:57:06 -0800 (PST) From: Yi-Hung Wei To: ovs-dev@openvswitch.org Date: Thu, 21 Jan 2021 10:51:45 -0800 Message-Id: <1611255105-18414-1-git-send-email-yihung.wei@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [ovs-dev] [PATCH] rhel: Add option to enable AF_XDP on rpm package X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This patch adds an RPMBUILD_OPT so that user can enable AF_XDP support in the rpm package by: $ make rpm-fedora RPMBUILD_OPT="--with afxdp" Signed-off-by: Yi-Hung Wei Tested-by: Yifeng Sun Reviewed-by: Yifeng Sun --- rhel/openvswitch-fedora.spec.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 2c0c4fa186a3..e03b26b6af34 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -28,6 +28,8 @@ %bcond_without libcapng # To enable DPDK support, specify '--with dpdk' when building %bcond_with dpdk +# To enable AF_XDP support, specify '--with afxdp' when building +%bcond_with afxdp # If there is a need to automatically enable the package after installation, # specify the "--with autoenable" @@ -73,6 +75,9 @@ BuildRequires: libpcap-devel numactl-devel BuildRequires: dpdk-devel >= 17.05.1 Provides: %{name}-dpdk = %{version}-%{release} %endif +%if %{with afxdp} +BuildRequires: libbpf-devel numactl-devel +%endif BuildRequires: unbound unbound-devel Requires: openssl hostname iproute module-init-tools unbound @@ -164,6 +169,9 @@ This package provides IPsec tunneling support for OVS tunnels. %if %{with dpdk} --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \ %endif +%if %{with afxdp} + --enable-afxdp \ +%endif --enable-ssl \ --disable-static \ --enable-shared \