From patchwork Thu Jan 23 17:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1228341 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; dmarc=fail (p=none dis=none) header.from=gmail.com 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=cFdrcc+G; 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 483TBT5lgxz9sQp for ; Fri, 24 Jan 2020 04:03:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DC14F87686; Thu, 23 Jan 2020 17:03:43 +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 oqXDmhssLcWT; Thu, 23 Jan 2020 17:03:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 073FA87681; Thu, 23 Jan 2020 17:03:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C611BC0176; Thu, 23 Jan 2020 17:03:42 +0000 (UTC) X-Original-To: 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 73578C0174 for ; Thu, 23 Jan 2020 17:03:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5A4F822264 for ; Thu, 23 Jan 2020 17:03:41 +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 2adQ4nfxPCWG for ; Thu, 23 Jan 2020 17:03:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by silver.osuosl.org (Postfix) with ESMTPS id 439B72221F for ; Thu, 23 Jan 2020 17:03:40 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id 2so1800285pfg.12 for ; Thu, 23 Jan 2020 09:03:40 -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=GPds2ktVJLsTEE1mFhtZLTwkE3ICTUAi4ysxhB/gSTU=; b=cFdrcc+Gc6avsQpsXwz3lUDY0OWlK5zjZiutBBOQ0MAcTip0m5SFGUIM96jmLJfLGh ExKBuVdF9TowH5xZNoVPDFB93HmpxEvnp/z0ZOWlnNgod2xsMGQzee7lXt96MN2KTNiz S08ls1dVeL7RYi+idj7QAtcrc9X0YUkSjsDQrf65esZSv5JXy8xf1pwzt5Egj3D4dDRi 8H/5dRXjcHs0s7iFmbS1JkdlkVjTqr4I1SUOJm+SIfnGrJ3OB1+xGK3VruQrna47I/dO XOTuVZGe9vviIes64RXZbE7fUnPafyYd1X5RvZbb/NqWED+EytVUyeFuGnco+c8mrjwI 7ulg== 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=GPds2ktVJLsTEE1mFhtZLTwkE3ICTUAi4ysxhB/gSTU=; b=rr679C/2dm4cte7ogRY36e0Nr2LH8rzAsZpplhwRXCwnGwgJMob7XHfXRCnbkH4Nx1 lcT0AmkHCJ2Rt4Ro+7JV7Vx2D4jI2CZ7HV/QWHtwSZbM/nKzjloOXfvNFDAxNZ5RHUie Wnm53JpGq7yFTfJq8J5gJTnKcaqdJ9lnkVS6e9zwmOluK/lvfyDhTSN49EDaEymlBPda wc5MOfyZZKVy3APgHP3qKOH1PZqlqmnuOFHeg7P9itSRImPya0Q6+iZ4iymICxhyGUKX zFKHJsTQxSXObNpbKJ2tmpfM1RR8v+6JkpHDs75shZ+MvtnP2jxjURz+gN/XLoh+kN8s fP5w== X-Gm-Message-State: APjAAAVKZhan7TnKWXLpfwKjsPMZDOewYs9W//k6wn7aR8CJutGakrwr wd55UbheHRty5LwWFIfBslo+J6hWlnM= X-Google-Smtp-Source: APXvYqwJeXcGEK1PveLW7mI7K67EjebaKzniaLWnh8socEe/Lcf0fRu+VtdSvlUmchoItVFs/lc/gw== X-Received: by 2002:a65:621a:: with SMTP id d26mr4815721pgv.151.1579799019620; Thu, 23 Jan 2020 09:03:39 -0800 (PST) Received: from sc9-mailhost2.vmware.com (c-76-21-95-192.hsd1.ca.comcast.net. [76.21.95.192]) by smtp.gmail.com with ESMTPSA id u26sm3188494pfn.46.2020.01.23.09.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Jan 2020 09:03:39 -0800 (PST) From: William Tu To: dev@openvswitch.org Date: Thu, 23 Jan 2020 09:03:11 -0800 Message-Id: <1579798991-41829-1-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: osinstom@gmail.com, i.maximets@ovn.org Subject: [ovs-dev] [PATCHv2] docs: Add header install command for afxdp. 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" The 'XDP_RING_NEED_WAKEUP' and related flags are defined if_xdp.h, so if users are building their own kernel, users have to update the kernel's header files, by doing: $ make headers_install INSTALL_HDR_PATH=/usr Otherwise the following error shows: /usr/local/include/bpf/xsk.h: In function 'xsk_ring_prod__needs_wakeup': /usr/local/include/bpf/xsk.h:82:21: error: 'XDP_RING_NEED_WAKEUP' undeclared \ (first use in this function) return *r->flags & XDP_RING_NEED_WAKEUP; Reported-by: Tomek Osinski Reported-at: https://osinstom.github.io/en/tutorial/ovs-afxdp-installation/ Signed-off-by: William Tu Acked-by: Ben Pfaff --- Documentation/intro/install/afxdp.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/intro/install/afxdp.rst b/Documentation/intro/install/afxdp.rst index c4685fa7ebac..99003e4dbdb2 100644 --- a/Documentation/intro/install/afxdp.rst +++ b/Documentation/intro/install/afxdp.rst @@ -108,6 +108,14 @@ vSwitch with AF_XDP will require the following: * CONFIG_XDP_SOCKETS_DIAG=y (Debugging) +- If you're building your own kernel, be sure that you're installing kernel + headers too. For example, with the following command:: + + make headers_install INSTALL_HDR_PATH=/usr + +- If you're using kernel from the distribution, be sure that corresponding + kernel headers package installed. + - Once your AF_XDP-enabled kernel is ready, if possible, run **./xdpsock -r -N -z -i ** under linux/samples/bpf. This is an OVS independent benchmark tools for AF_XDP.