DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com,
	david.marchand@redhat.com
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [dpdk-dev] [PATCH 0/3] net/virtio: add vdpa device config support
Date: Tue,  8 Jun 2021 16:14:02 +0200	[thread overview]
Message-ID: <20210608141405.52917-1-maxime.coquelin@redhat.com> (raw)

This patch adds vDPA device config space requests support.
For now, it only adds MAC address get and set. It may be
extended in next revision to support other configs like
link state.

Regarding the MAC selection strategy, if devargs MAC address
is set by the user and valid, the driver tries to store it
in the device config space, then it reads the MAC address
back from the device config, which will be used. If not set
in devargs or invalid, it tries to read it from the device.
If it fails, a random MAC will be used.

I'm interrested to know your feedback on this strategy.

It has been tested with vDPA simulator, which only supports
getting the MAC address, and witch CX6 which supports neither
getting or setting MAC address (and so devarg or random MAC is
used). IFCVF driver seems to support both getting and setting
the MAC, I have a try with it before next revision.

Changes since RFC:
------------------
- Rebase
- Improve logging by printing used MAC address when specified
  by the user or the device (Adrian, Chenbo)


Maxime Coquelin (3):
  net/virtio: keep device and frontend features separated
  net/virtio: add device config support to vDPA
  net/virtio: add MAC device config getter and setter

 drivers/net/virtio/virtio_user/vhost.h        |  3 +
 drivers/net/virtio/virtio_user/vhost_vdpa.c   | 69 ++++++++++++++
 .../net/virtio/virtio_user/virtio_user_dev.c  | 95 +++++++++++++++----
 .../net/virtio/virtio_user/virtio_user_dev.h  |  2 +
 drivers/net/virtio/virtio_user_ethdev.c       | 12 ++-
 5 files changed, 158 insertions(+), 23 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-06-08 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 14:14 Maxime Coquelin [this message]
2021-06-08 14:14 ` [dpdk-dev] [PATCH 1/3] net/virtio: keep device and frontend features separated Maxime Coquelin
2021-06-16 12:25   ` Xia, Chenbo
2021-06-08 14:14 ` [dpdk-dev] [PATCH 2/3] net/virtio: add device config support to vDPA Maxime Coquelin
2021-06-16 12:26   ` Xia, Chenbo
2021-06-17 12:59     ` Maxime Coquelin
2021-06-08 14:14 ` [dpdk-dev] [PATCH 3/3] net/virtio: add MAC device config getter and setter Maxime Coquelin
2021-06-16 12:27   ` Xia, Chenbo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210608141405.52917-1-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=amorenoz@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).