From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35E3BA00BE; Wed, 30 Oct 2019 16:07:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C1CC1C010; Wed, 30 Oct 2019 16:07:29 +0100 (CET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by dpdk.org (Postfix) with ESMTP id 7F5811C011 for ; Wed, 30 Oct 2019 16:07:27 +0100 (CET) X-Originating-IP: 90.177.210.238 Received: from [192.168.1.110] (238.210.broadband10.iol.cz [90.177.210.238]) (Authenticated sender: i.maximets@ovn.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id DCF0924000D; Wed, 30 Oct 2019 15:07:24 +0000 (UTC) To: Thomas Monjalon Cc: dev@dpdk.org, Shahaf Shuler , Jerin Jacob , Andrew Rybchenko , Ferruh Yigit , Stephen Hemminger References: <4165509.5enYigmRGf@xps> <20191029185051.32203-1-thomas@monjalon.net> From: Ilya Maximets Message-ID: <0fd4b3fc-ec27-484d-8ed6-370fa7905eb6@ovn.org> Date: Wed, 30 Oct 2019 16:07:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191029185051.32203-1-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 0/3] ethdev: configure SR-IOV VF from host X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 29.10.2019 19:50, Thomas Monjalon wrote: > In a virtual environment, the network controller may have to configure > some SR-IOV VF parameters for security reasons. > > When the PF (host port) is driven by DPDK (OVS-DPDK case), > we face two different cases: > - driver is bifurcated (Mellanox case), > so the VF can be configured via the kernel. > - driver is on top of UIO or VFIO, so DPDK API is required, > and PMD-specific APIs were used. So, what is wrong with setting VF mac via the representor port as it done now? From our previous discussion, I thought that we concluded that is enough to have current API, i.e. just call set_default_mac() for a representor port and this will lead to setting mac for VF. This is how it's implemented in Linux kernel and this is how it's implemented in current DPDK drivers that supports setting mac for the representor. The only use case for this new API is to be able to control mac of the representor itself, which doesn't make much sense. At least there are only hypothetical use cases. And once again, Linux kernel doesn't support this behavior. > This new generic API will avoid vendors fragmentation. I don't see the fragmentation. Right now you can set VF mac from DPDK by calling set_default_mac() for representor. This API exists for all vendors. Not implemented for Intel, but new API is not implemented too. The this is that this new API will produce conceptual fragmentation between DPDK and the Linux kernel, because to do the same thing you'll have to use different ways. I mean, to change mac of VF in kernel you need to set mac to the representor, but in DPDK changing setting mac to representor will lead to changing the mac of the representor itself, not the VF. This will be really confusing for users. > > Some PMD-specific API could migrate to this generic model. > As an example, the default MAC address configuration is demonstrated > for a VF mapped to mlx5 representor port. > > As it breaks the ABI, I propose to merge this API in DPDK 19.11-rc2. > > I am sorry I had not send a patch since proposing a RFC in August. > (I gave priority to the summit and the -rc1 release) > > > Thomas Monjalon (3): > ethdev: identify SR-IOV VF from host > ethdev: set VF MAC address from host > net/mlx5: set VF MAC address from host > > drivers/net/mlx5/mlx5.c | 6 +++ > drivers/net/mlx5/mlx5.h | 1 + > drivers/net/mlx5/mlx5_mac.c | 19 ++++++++ > lib/librte_ethdev/rte_ethdev.c | 55 +++++++++++++++++++++--- > lib/librte_ethdev/rte_ethdev.h | 38 ++++++++++++++++ > lib/librte_ethdev/rte_ethdev_core.h | 1 + > lib/librte_ethdev/rte_ethdev_version.map | 1 + > 7 files changed, 114 insertions(+), 7 deletions(-) >