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 9C1DBA0C41; Fri, 16 Apr 2021 09:29:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A7E6141A20; Fri, 16 Apr 2021 09:29:06 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 39C82141A1E for ; Fri, 16 Apr 2021 09:29:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618558143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l6bJLoRLxF+41nSmzd5GFGVELeNY+G3lQA2YPqx38QM=; b=Xj3v5VBY6vpAs4YWg34w/hB01ZVvM+4SfPWGgpEoAbfQSW4eNwcD7YvFOryschmMGiXhNL qWaVk1hIFebyvr/9gU6I4GVZTKiOhSF69PX+Dnf1lLqZ5KEIVJnfDXCcwH7SekMvw50O5f 6tBhQdLBmjl+w3xdjeC6oNNrCWQWhus= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-294-Ck8b9gH2Odils9BllyfA8Q-1; Fri, 16 Apr 2021 03:28:58 -0400 X-MC-Unique: Ck8b9gH2Odils9BllyfA8Q-1 Received: by mail-wm1-f70.google.com with SMTP id l6-20020a1c25060000b029010ee60ad0fcso3423111wml.9 for ; Fri, 16 Apr 2021 00:28:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=l6bJLoRLxF+41nSmzd5GFGVELeNY+G3lQA2YPqx38QM=; b=sqoNMuuvHB/dAX9ORH9GyfSN3fvVAwIL3woxpzd6WFECeAkwc0EkN9UABeVUlF7W8J jqhTmJrPTcPyw/eoLOUqwQNtG+3ttRgGUswv7szoCYQUpoHVo60YCoGjij/J7XmMyq6G VKo1Jx153IITVngipj2WT/rVoCsofRoeJ47agJpxGc5HAiJAtSTVgSMA999TGt8X/uEu ttKaugbumuDntaqNGI8iCxSnUSK4oQwTRpFZrAKclJr7IYD0R5g71epDBUZlpS2uV9Dw HNS7SbMWwGSHa0owp53OGdXIDC+DdG6MCWKBI0Sp7JuUML6ovtW422yxrlItezs3ybgR SDOw== X-Gm-Message-State: AOAM533ekbcw4aH8jjjeoVnBUkERJ76pNcFenI9dRkBUGVZuZXhmNBtU eBSKxBGyzoNs9g5vDGIfes2tQXjy+qfys3uYGGDqJqrBY4rbBkylvdZMrzd8XcxRpeuMqRlWcsk Eybo= X-Received: by 2002:a05:600c:247:: with SMTP id 7mr4793151wmj.111.1618558137687; Fri, 16 Apr 2021 00:28:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmQp597ethCp+gcdkMKk/sxjvpDq4NHwQtSFpwGmMsV5RG3arse5dkv/qQ4ya4G9GvvgVMAA== X-Received: by 2002:a05:600c:247:: with SMTP id 7mr4793139wmj.111.1618558137482; Fri, 16 Apr 2021 00:28:57 -0700 (PDT) Received: from amorenoz.users.ipa.redhat.com ([94.73.62.62]) by smtp.gmail.com with ESMTPSA id x25sm7438417wmj.34.2021.04.16.00.28.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 00:28:56 -0700 (PDT) To: Maxime Coquelin , dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com References: <20210318223526.168614-1-maxime.coquelin@redhat.com> From: Adrian Moreno Message-ID: Date: Fri, 16 Apr 2021 09:28:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210318223526.168614-1-maxime.coquelin@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=amorenoz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [RFC 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" On 3/18/21 11:35 PM, Maxime Coquelin wrote: > 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. In general, I think it's a reasonable strategy. Once we have cq support, things will be a bit easier. Some questions: How should we interpret failure to configure the mac (i.e: after set and get, they still don't match)? Should we fail virtio_user_dev_init if the configuration provided by devargs is not successfully applied? Should a zero mac be treated differntly as qemu does? [1] [1] https://patchwork.ozlabs.org/project/qemu-devel/patch/20210302142014.141135-3-mst@redhat.com/ > 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. Does cx6 negotiate VIRTIO_NET_F_MAC? > > 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 | 88 +++++++++++++++---- > .../net/virtio/virtio_user/virtio_user_dev.h | 2 + > drivers/net/virtio/virtio_user_ethdev.c | 12 ++- > 5 files changed, 151 insertions(+), 23 deletions(-) > -- Adrián Moreno