From patchwork Mon Nov 2 12:48:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: William Breathitt Gray X-Patchwork-Id: 1392214 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CPt5g0Vjgz9sVN; Mon, 2 Nov 2020 23:49:09 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kZZGg-0005v6-W8; Mon, 02 Nov 2020 12:49:02 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kZZGe-0005uO-QZ for kernel-team@lists.ubuntu.com; Mon, 02 Nov 2020 12:49:00 +0000 Received: from mail-qv1-f70.google.com ([209.85.219.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kZZGe-000426-FR for kernel-team@lists.ubuntu.com; Mon, 02 Nov 2020 12:49:00 +0000 Received: by mail-qv1-f70.google.com with SMTP id x10so3413825qvo.22 for ; Mon, 02 Nov 2020 04:49:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=nC7lGoe6KML9UK/jSDo92Fm2M2X1umy4JEapLYgyTTY=; b=J5oh1R0JQSs6JB1f+hQeegCTmR+V359ZqYF+viqHOUgtwI1ULcWlGguZH+u5Faf0hF Ho/gSOsaoUCrtQbjYWr68e40JXuLcE/uuCNZdVuE2G6rNVZSwu3mMn1N11TacQbBSJFi OgIttLi3SUZsibVsQe3HvixhLMCmLJ0dOo6vBhb21EQY7M6Pr/g09aBY5gyZEe59dwEe Zv+qKp5CcmMOJc61CI1soQQVrSWCWx04q8irlQm0qo5cn/6fwBYjTycLNMmJ+u1NAs6s 2E7ryaWflUocAspGBdyfZMIxvErgg5U6oPk8deiV90/Ij//pK4OIdMvlWtXj6sLAf8BI rwtA== X-Gm-Message-State: AOAM531AZ1yHllZQzGnU9iZ9PDjN8DB3WmzesV8U0A8UdHXWtKTpSts+ 2D87N3090jFj/QoOwPDv7ch8BtzBe1FDlSBrE+hMumDB1jgT1VZlGWqNR+D3otxYzrpLpRO/eUu q+6Ia2mr7xgJ/t8tG7BhYykS/IoL2RY9yrUeQ3fqVaw== X-Received: by 2002:a0c:e002:: with SMTP id j2mr518007qvk.3.1604321339101; Mon, 02 Nov 2020 04:48:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcMfM90HHelF3CyyPm2PIEeRzPbgIZ1bGvMJ21NKkp5TCFl5lJDXJdNdOvfdwLr2hDUR/NEQ== X-Received: by 2002:a0c:e002:: with SMTP id j2mr517986qvk.3.1604321338771; Mon, 02 Nov 2020 04:48:58 -0800 (PST) Received: from localhost.localdomain (072-189-064-225.res.spectrum.com. [72.189.64.225]) by smtp.gmail.com with ESMTPSA id q7sm7666201qtd.49.2020.11.02.04.48.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 04:48:58 -0800 (PST) From: William Breathitt Gray To: kernel-team@lists.ubuntu.com Subject: [SRU][B:linux-azure-4.15][PATCH 00/40] hv_netvsc: Add XDP support Date: Mon, 2 Nov 2020 07:48:16 -0500 Message-Id: <20201102124856.4659-1-william.gray@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1877654 [Impact] Microsoft would like to request the following three patches in all releases supported on Azure: 351e1581395fc (“hv_netvsc: Add XDP support”) 12fa74383ed4d (“hv_netvsc: Update document for XDP support”) 184367dce4f7 (“hv_netvsc: Fix XDP refcnt for synthetic and VF NICs”) These patches add support of XDP in native mode to the hv_netvsc driver, and transparently sets the XDP program on the associated VF NIC as well. [Regression Potential] The backport to Bionic:linux-azure-4.15 required a lot of context adjustments. Regression potentials are spread across a number of files and drivers. Most adjustments were trivial, but the changes in netvsc_drv.c should be kept an eye on. In particular, if a regression occurs it will likely happen in the netvsc_alloc_recv_skb(), netvsc_recv_callback(), or netvsc_devinfo_get() functions due to the context difference of these areas compared to the original patch. In general, Linux 4.15 was missing key code for XDP. As such, many prelimary commit backports were required to pull in that support before it could be added to hv_netvsc driver in the primary backports. [Miscellaneous] The 5.4 version is already released so we do not need to worry about that series. Backports of the "xdp: new XDP rx-queue info concept" patchset and "XDP redirect memory return API" patchset patches are included to add support for the XDP API: https://patchwork.ozlabs.org/project/netdev/cover/151497504273.18176.10177133999720101758.stgit@firesoul/ https://patchwork.ozlabs.org/project/netdev/cover/152397622657.20272.10121948713784224943.stgit@firesoul/ Björn Töpel (5): i40e: add support for XDP_REDIRECT xsk: add user memory registration support sockopt xsk: add Rx queue setup and mmap support xsk: add Rx receive functions and poll support xdp: add MEM_TYPE_ZERO_COPY Haiyang Zhang (5): hv_netvsc: Add support for LRO/RSC in the vSwitch hv_netvsc: Refactor assignments of struct netvsc_device_info hv_netvsc: Add XDP support hv_netvsc: Update document for XDP support hv_netvsc: Fix XDP refcnt for synthetic and VF NICs Jason Wang (3): tun/tap: use ptr_ring instead of skb_array tuntap: XDP transmission tuntap: XDP_TX can use native XDP Jesper Dangaard Brouer (24): xdp: base API for new XDP rx-queue info concept ixgbe: setup xdp_rxq_info xdp/qede: setup xdp_rxq_info and intro xdp_rxq_info_is_reg tun: setup xdp_rxq_info virtio_net: setup xdp_rxq_info xdp: generic XDP handling of xdp_rxq_info net: avoid including xdp.h in filter.h virtio_net: fix ndo_xdp_xmit crash towards dev not ready for XDP xdp: introduce xdp_return_frame API and use in cpumap ixgbe: use xdp_return_frame API xdp: move struct xdp_buff from filter.h to xdp.h xdp: introduce a new xdp_frame type tun: convert to use generic xdp_frame and xdp_return_frame API virtio_net: convert to use generic xdp_frame and xdp_return_frame API bpf: cpumap convert to use generic xdp_frame i40e: convert to use generic xdp_frame and xdp_return_frame API xdp: rhashtable with allocator ID to pointer mapping page_pool: refurbish version of page_pool code xdp: allow page_pool as an allocator type in xdp_return_frame xdp: transition into using xdp_frame for return API xdp: transition into using xdp_frame for ndo_xdp_xmit bpf: devmap introduce dev_map_enqueue bpf: devmap prepare xdp frames for bulking xdp: introduce xdp_return_frame_rx_napi Magnus Karlsson (2): xsk: add umem fill queue support and mmap xsk: add support for bind for Rx Stephen Hemminger (1): hv_netvsc: pass netvsc_device to receive callback Documentation/networking/netvsc.txt | 21 + debian.azure-4.15/config/config.common.ubuntu | 1 + drivers/net/ethernet/intel/i40e/i40e_main.c | 2 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 103 +++- drivers/net/ethernet/intel/i40e/i40e_txrx.h | 3 + drivers/net/ethernet/intel/ixgbe/ixgbe.h | 5 +- .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 48 +- .../net/ethernet/mellanox/mlx5/core/Kconfig | 1 + .../net/ethernet/mellanox/mlx5/core/en_rx.c | 1 + drivers/net/ethernet/qlogic/qede/qede.h | 2 + drivers/net/ethernet/qlogic/qede/qede_fp.c | 1 + drivers/net/ethernet/qlogic/qede/qede_main.c | 10 + drivers/net/hyperv/Makefile | 2 +- drivers/net/hyperv/hyperv_net.h | 70 ++- drivers/net/hyperv/netvsc.c | 48 +- drivers/net/hyperv/netvsc_bpf.c | 218 ++++++++ drivers/net/hyperv/netvsc_drv.c | 335 ++++++++---- drivers/net/hyperv/rndis_filter.c | 96 +++- drivers/net/tap.c | 42 +- drivers/net/tun.c | 291 +++++++++-- drivers/net/virtio_net.c | 89 +++- drivers/vhost/net.c | 53 +- include/linux/bpf.h | 16 +- include/linux/filter.h | 24 +- include/linux/if_tap.h | 6 +- include/linux/if_tun.h | 21 +- include/linux/netdevice.h | 6 +- include/net/page_pool.h | 144 +++++ include/net/xdp.h | 143 +++++ include/net/xdp_sock.h | 58 ++ include/trace/events/xdp.h | 9 +- include/uapi/linux/if_xdp.h | 76 +++ kernel/bpf/cpumap.c | 132 ++--- kernel/bpf/devmap.c | 103 +++- net/Kconfig | 3 + net/Makefile | 1 + net/core/Makefile | 3 +- net/core/dev.c | 69 ++- net/core/filter.c | 14 +- net/core/page_pool.c | 317 +++++++++++ net/core/xdp.c | 372 +++++++++++++ net/xdp/Makefile | 2 + net/xdp/xdp_umem.c | 255 +++++++++ net/xdp/xdp_umem.h | 66 +++ net/xdp/xdp_umem_props.h | 23 + net/xdp/xsk.c | 494 ++++++++++++++++++ net/xdp/xsk_queue.c | 73 +++ net/xdp/xsk_queue.h | 151 ++++++ 49 files changed, 3610 insertions(+), 417 deletions(-) create mode 100644 drivers/net/hyperv/netvsc_bpf.c create mode 100644 include/net/page_pool.h create mode 100644 include/net/xdp.h create mode 100644 include/net/xdp_sock.h create mode 100644 include/uapi/linux/if_xdp.h create mode 100644 net/core/page_pool.c create mode 100644 net/core/xdp.c create mode 100644 net/xdp/Makefile create mode 100644 net/xdp/xdp_umem.c create mode 100644 net/xdp/xdp_umem.h create mode 100644 net/xdp/xdp_umem_props.h create mode 100644 net/xdp/xsk.c create mode 100644 net/xdp/xsk_queue.c create mode 100644 net/xdp/xsk_queue.h Acked-by: Stefan Bader Acked-by: Kamal Mostafa