mbox series

[SRU,B:linux-azure-4.15,00/40] hv_netvsc: Add XDP support

Message ID 20201102124856.4659-1-william.gray@canonical.com
Headers show
Series hv_netvsc: Add XDP support | expand

Message

William Breathitt Gray Nov. 2, 2020, 12:48 p.m. UTC
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

Comments

Stefan Bader Nov. 3, 2020, 9:47 a.m. UTC | #1
On 02.11.20 13:48, William Breathitt Gray wrote:
> 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
> 
Submissions of that size should be rather done as pull requests. Things get
rather unwieldy otherwise...

-Stefan
William Breathitt Gray Nov. 3, 2020, 4:28 p.m. UTC | #2
On Tue, Nov 03, 2020 at 10:47:54AM +0100, Stefan Bader wrote:
> On 02.11.20 13:48, William Breathitt Gray wrote:
> > 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
> > 
> Submissions of that size should be rather done as pull requests. Things get
> rather unwieldy otherwise...
> 
> -Stefan

Thanks, I'll make sure to submit patchset like this as pull requests in
the future. Do you want me to resubmit this, or should we wait for
comments first because it's already been submitted?

William Breathitt Gray
Stefan Bader Nov. 3, 2020, 4:31 p.m. UTC | #3
On 03.11.20 17:28, William Breathitt Gray wrote:
> On Tue, Nov 03, 2020 at 10:47:54AM +0100, Stefan Bader wrote:
>> On 02.11.20 13:48, William Breathitt Gray wrote:
>>> 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
>>>
>> Submissions of that size should be rather done as pull requests. Things get
>> rather unwieldy otherwise...
>>
>> -Stefan
> 
> Thanks, I'll make sure to submit patchset like this as pull requests in
> the future. Do you want me to resubmit this, or should we wait for
> comments first because it's already been submitted?

No need to re-submit but you could push things somewhere and reply to the cover
with the output of git request-pull.

-Stefan

> 
> William Breathitt Gray
>
William Breathitt Gray Nov. 4, 2020, 12:38 p.m. UTC | #4
The following changes since commit c0cfc6f64a2688a90ce5341935a50246d77ea7ad:

  cifs: Fix potential softlockups while refreshing DFS cache (2020-10-28 14:31:24 -0500)

are available in the Git repository at:

  git+ssh://git.launchpad.net/~vilhelm-gray/ubuntu/+source/linux/+git/sf277232 sf277232

for you to fetch changes up to ee3bf1e4cb2325d1e52048e5ea227ba1d07c76d8:

  hv_netvsc: Fix XDP refcnt for synthetic and VF NICs (2020-11-04 07:15:19 -0500)

----------------------------------------------------------------
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
Stefan Bader Nov. 4, 2020, 1:50 p.m. UTC | #5
On 02.11.20 13:48, William Breathitt Gray wrote:
> 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
> 
Due to size I did more formally check and we rely rather on specific environment
and testing.

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Kelsey Skunberg Nov. 6, 2020, 3:35 a.m. UTC | #6
Hey William, 

This one sent you down quite the adventure! I'm wondering if it could be
worth sending a test kernel to msft to test since it differs so much
from the 5.4 backports. Were there any tests ran for this that can be
considered or documented?

+CCing Marcelo - I believe his eyes would be great to check this over -
I'm mostly a bit paranoid due to the size of this set and regression
potential. 

Appreciate the work you put in! 

-Kelsey 

On 2020-11-02 07:48:16 , William Breathitt Gray wrote:
> 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
> 
> -- 
> 2.25.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kamal Mostafa Jan. 21, 2021, 5:10 p.m. UTC | #7
Ugh, that's a whole lotta patches!

Acked-by: Kamal Mostafa <kamal@canonical.com>

*crosses-fingers*

 -Kamal

On Mon, Nov 02, 2020 at 07:48:16AM -0500, William Breathitt Gray wrote:
> 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
> 
> -- 
> 2.25.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kelsey Skunberg Jan. 27, 2021, 1:14 a.m. UTC | #8
Hi William, 

I'm getting merge conflicts with the following two commits:

hv_netvsc: pass netvsc_device to receive callback
hv_netvsc: Add support for LRO/RSC in the vSwitch

The second patch has large merge conflicts that causes me to be leary
resolving and merging without another review. May you please take a look
and send a v2? If this gets resolved soon we can still see about
applying this for next cycle. Thank you! 

-Kelsey

On 2020-11-02 07:48:16 , William Breathitt Gray wrote:
> 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
> 
> -- 
> 2.25.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team