virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next v2 00/14] vdpa: Enable user to set mac address, mtu
@ 2021-04-06 17:04 Parav Pandit
  2021-04-06 17:04 ` [PATCH linux-next v2 01/14] vdpa: Follow kdoc comment style Parav Pandit
                   ` (14 more replies)
  0 siblings, 15 replies; 33+ messages in thread
From: Parav Pandit @ 2021-04-06 17:04 UTC (permalink / raw)
  To: virtualization; +Cc: elic, mst

Currently user cannot set the mac address and mtu of the vdpa device.
This patchset enables users to set the mac address and mtu of the vdpa
device once the device is created.
If a vendor driver supports such configuration user can set it otherwise
user gets unsupported error.

vdpa mac address and mtu are device configuration layout fields.
To keep interface generic enough for multiple types of vdpa devices, mac
address and mtu setting is implemented as configuration layout config
knobs.
This enables to use similar config layout for other virtio devices.

An example of query & set of config layout fields for vdpa_sim_net
driver:

Configuration layout fields are set after device is created.
This enables user to change such fields at later point without destroying and
recreating the device for new config.

$ vdpa mgmtdev show
vdpasim_net:
  supported_classes net

Add the device:
$ vdpa dev add name bar mgmtdev vdpasim_net

Configure mac address and mtu:
$ vdpa dev config set bar mac 00:11:22:33:44:55 mtu 9000

In above command only mac address or only mtu can also be set.

View the config after setting:
$ vdpa dev config show
bar: mac 00:11:22:33:44:55 link up link_announce false mtu 9000 speed 0 duplex 0

Patch summary:
Patch-1 fix kdoc style comments
Patch-2 fix kdoc style comments
Patch-3 introduced and use helpers for get/set config and features
Patch-4 implement query device config layout
Patch-5 enanble user to set mac and mtu in config space
Patch-6 vdpa_sim_net implements get and set of config layout
Patch-7 mlx5 vdpa driver use right dma device for PCI PF,VF,SF
Patch-8 mlx5 vdpa driver uses right BAR offset for SF
Patch-9 mlx5 vdpa driver migrates to user created vdpa device
Patch-10 mlx5 vdpa driver supports user provided mac config
Patch-11 mlx5 vdpa driver uses user provided mac during rx flow steering
Patch-12 mlx5 vdpa driver excludes header length and fcs
Patch-13 mlx5 vdpa driver fixes index restoration during suspend resume
Patch-14 mlx5 vdpa driver fixes bit usage

changelog:
v1->v2:
 - new patches to fix kdoc comment to add new kdoc section
 - new patch to have synchronized access to features and config space
 - read whole net config layout instead of individual fields
 - added error extack for unmanaged vdpa device
 - fixed several endianness issues
 - introduced vdpa device ops for get config which is synchronized
   with other get/set features ops and config ops
 - fixed mtu range checking for max
 - using NLA_POLICY_ETH_ADDR
 - set config moved to device ops instead of mgmtdev ops
 - merged build and set to single routine
 - ensuring that user has NET_ADMIN capability for configuring network
   attributes
 - using updated interface and callbacks for get/set config
 - following new api for config get/set for mgmt tool in mlx5 vdpa
   driver
 - fixes for accessing right SF dma device and bar address
 - fix for mtu calculation
 - fix for bit access in features
 - fix for index restore with suspend/resume operation

Eli Cohen (7):
  vdpa/mlx5: Use the correct dma device when registering memory
  vdpa/mlx5: Retrieve BAR address suitable any function
  vdpa/mlx5: Enable user to add/delete vdpa device
  vdpa/mlx5: Support configuration of MAC
  vdpa/mlx5: Forward only packets with allowed MAC address
  vdpa/mlx5: Fix suspend/resume index restoration
  vdpa/mlx5: Fix wrong use of bit numbers

Parav Pandit (6):
  vdpa: Follow kdoc comment style
  vdpa: Follow kdoc comment style
  vdpa: Introduce and use vdpa device get,set config, features helpers
  vdpa: Introduce query of device config layout
  vdpa: Enable user to set mac and mtu of vdpa device
  vdpa_sim_net: Enable user to set mac address and mtu

Si-Wei Liu (1):
  vdpa/mlx5: should exclude header length and fcs from mtu

 drivers/vdpa/mlx5/core/mlx5_vdpa.h   |   4 +
 drivers/vdpa/mlx5/core/mr.c          |   9 +-
 drivers/vdpa/mlx5/core/resources.c   |   3 +-
 drivers/vdpa/mlx5/net/mlx5_vnet.c    | 264 ++++++++++++++----
 drivers/vdpa/vdpa.c                  | 383 ++++++++++++++++++++++++++-
 drivers/vdpa/vdpa_sim/vdpa_sim.c     |  26 ++
 drivers/vdpa/vdpa_sim/vdpa_sim.h     |   4 +
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c |  39 +--
 drivers/vhost/vdpa.c                 |   6 +-
 include/linux/vdpa.h                 | 123 ++++++---
 include/uapi/linux/vdpa.h            |  12 +
 11 files changed, 752 insertions(+), 121 deletions(-)

-- 
2.26.2

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2021-04-08  6:23 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 17:04 [PATCH linux-next v2 00/14] vdpa: Enable user to set mac address, mtu Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 01/14] vdpa: Follow kdoc comment style Parav Pandit
2021-04-07  3:08   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 02/14] " Parav Pandit
2021-04-07  3:09   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 03/14] vdpa: Introduce and use vdpa device get, set config, features helpers Parav Pandit
2021-04-07  3:18   ` [PATCH linux-next v2 03/14] vdpa: Introduce and use vdpa device get,set " Jason Wang
2021-04-07  3:52     ` Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 04/14] vdpa: Introduce query of device config layout Parav Pandit
2021-04-07  3:56   ` Jason Wang
2021-04-07  5:10     ` Parav Pandit
2021-04-07  7:12       ` Jason Wang
2021-04-08  6:23         ` Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 05/14] vdpa: Enable user to set mac and mtu of vdpa device Parav Pandit
2021-04-07  3:59   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 06/14] vdpa_sim_net: Enable user to set mac address and mtu Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 07/14] vdpa/mlx5: Use the correct dma device when registering memory Parav Pandit
2021-04-07  4:00   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 08/14] vdpa/mlx5: Retrieve BAR address suitable any function Parav Pandit
2021-04-07  5:32   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 09/14] vdpa/mlx5: Enable user to add/delete vdpa device Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 10/14] vdpa/mlx5: Support configuration of MAC Parav Pandit
2021-04-07  7:21   ` Jason Wang
2021-04-06 17:04 ` [PATCH linux-next v2 11/14] vdpa/mlx5: Forward only packets with allowed MAC address Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 12/14] vdpa/mlx5: should exclude header length and fcs from mtu Parav Pandit
2021-04-06 17:04 ` [PATCH linux-next v2 13/14] vdpa/mlx5: Fix suspend/resume index restoration Parav Pandit
2021-04-07  7:25   ` Jason Wang
     [not found]     ` <20210407101612.GB207753@mtl-vdi-166.wap.labs.mlnx>
2021-04-07 13:38       ` Michael S. Tsirkin
2021-04-06 17:04 ` [PATCH linux-next v2 14/14] vdpa/mlx5: Fix wrong use of bit numbers Parav Pandit
2021-04-07  7:25   ` Jason Wang
2021-04-07  7:28     ` Parav Pandit
2021-04-07  7:28 ` [PATCH linux-next v2 00/14] vdpa: Enable user to set mac address, mtu Jason Wang
2021-04-08  3:45   ` Parav Pandit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).