From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93FDFA0C40; Tue, 8 Jun 2021 16:14:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 104914069F; Tue, 8 Jun 2021 16:14:23 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 72AD74067A for ; Tue, 8 Jun 2021 16:14:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623161660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0SYGfM3MTvpgwaLwnz3KbbOHbWDkBH+LWSGVQUa5OU=; b=W/1HDWdQzfc2AEUJS4uplcepPLditCa3oUIOMGm3ibdJTG7YmfmWRVGI2PpFT4oYFPDcwQ lFRBIGKG9B9AqKSrgCsJRlye1Ab3CgDhPEoFlKDxcXUrPwoQ2P2wBN27KpmFX7KO/qXQI+ FgeINAqzYQVghaSiWhUkuQ4RLOXcRdo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-E897mrJENcSvxnuLbe0Lrw-1; Tue, 08 Jun 2021 10:14:18 -0400 X-MC-Unique: E897mrJENcSvxnuLbe0Lrw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B652107AD24; Tue, 8 Jun 2021 14:14:17 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.36.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id B910E5D9E3; Tue, 8 Jun 2021 14:14:09 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, amorenoz@redhat.com, david.marchand@redhat.com Cc: Maxime Coquelin Date: Tue, 8 Jun 2021 16:14:02 +0200 Message-Id: <20210608141405.52917-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH 0/3] net/virtio: add vdpa device config support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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