From patchwork Tue Oct 29 18:50:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 62175 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 211F9A00BE; Tue, 29 Oct 2019 19:51:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 410F71BF71; Tue, 29 Oct 2019 19:51:01 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 61AB71BF45 for ; Tue, 29 Oct 2019 19:50:59 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D776421C39; Tue, 29 Oct 2019 14:50:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 29 Oct 2019 14:50:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=EG5G5wz3MT OVtOG2bZzizdMJuHJBcPoe3ye4FLFl2Ys=; b=FBnCaKgXYzRllmmPIcVoOdxnAf nGfUiFVmrP1ssOjrF/ft4SnI9yep1ExVg+6TFKegUQcH4c2LwIvPEX3N71j27rna bgQkLPV6Cwnu6HQWiKAFuPVAXbHEIIHn+KHQi6RBEPKXWR6zTjRDQW3ODDcXrNwe b14+ds8XpHEzE6lwY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=EG5G5wz3MTOVtOG2bZzizdMJuHJBcPoe3ye4FLFl2Ys=; b=crmw7iUo yPuNZibr1hF2uQ+ylizb04PNIzrGUmQCjp+AaYr4w2vA2vLE7SrvtSCu57XMf5f1 YbQBNwu8BSyIJrAFqLe2VW99Py/Nonmf696HfM2hcTOE1m/NFMtw9feisHxQbE8c xlKqk+Eocbfhm6pPtYsTGk/ETzgmLrjnHAY1kg3fI9dKC+1CUi/3vsEB7rJNNQQb r9akDW9fvS29+SVJxz7ah0k1SRNMeJwYG1SQTUe3Q+4rHZx2hQDMGW6KK8RLOhfY XxVMaDAWh4BkvIK+aZ/pDd7pF+ZO07IOTGcQ5fmwlleo+lPGKd7FUM4rW3ZblqEG Q4610+99nvhGLg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddtuddgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecumhhishhsihhnghcuvffquchfihgvlhguucdlfe dtmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhh ohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqe enucfkphepjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhm pehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 3EA99D6006A for ; Tue, 29 Oct 2019 14:50:58 -0400 (EDT) From: Thomas Monjalon To: Cc: dev@dpdk.org Date: Tue, 29 Oct 2019 19:50:48 +0100 Message-Id: <20191029185051.32203-1-thomas@monjalon.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <4165509.5enYigmRGf@xps> References: <4165509.5enYigmRGf@xps> MIME-Version: 1.0 Subject: [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" 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. This new generic API will avoid vendors fragmentation. 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(-)