From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v2 1/6] net/mlx5: lay groundwork for switch offloads Date: Mon, 23 Jul 2018 22:40:47 +0100 Message-ID: References: <20180627173355.4718-1-adrien.mazarguil@6wind.com> <20180713092910.26276-1-adrien.mazarguil@6wind.com> <20180713092910.26276-2-adrien.mazarguil@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Nelio Laranjeiro , Yongseok Koh , dev@dpdk.org To: Adrien Mazarguil , Shahaf Shuler Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id D1BE3160 for ; Mon, 23 Jul 2018 23:41:04 +0200 (CEST) In-Reply-To: <20180713092910.26276-2-adrien.mazarguil@6wind.com> Content-Language: en-US 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 7/13/2018 10:40 AM, Adrien Mazarguil wrote: > With mlx5, unlike normal flow rules implemented through Verbs for traffic > emitted and received by the application, those targeting different logical > ports of the device (VF representors for instance) are offloaded at the > switch level and must be configured through Netlink (TC interface). > > This patch adds preliminary support to manage such flow rules through the > flow API (rte_flow). > > Instead of rewriting tons of Netlink helpers and as previously suggested by > Stephen [1], this patch introduces a new dependency to libmnl [2] > (LGPL-2.1) when compiling mlx5. > > [1] https://mails.dpdk.org/archives/dev/2018-March/092676.html > [2] https://netfilter.org/projects/libmnl/ Just to highlight this new PMD level dependency to libmnl. tap pmd also uses netlink and vdev_netvsc also does nl communication, perhaps we can discuss unifying netlink usage around this new library. > > Signed-off-by: Adrien Mazarguil > Acked-by: Nelio Laranjeiro > Cc: Yongseok Koh > -- > v2 changes: > > - Added NETLINK_CAP_ACK definition if missing from the host system. This > parameter is also not mandatory anymore and won't prevent creation of > NL sockets when not supported. > - Modified mlx5_nl_flow_nl_ack() and mlx5_nl_flow_init() to consume the > least amount of stack space based on message size, instead of the fixed > MNL_SOCKET_BUFFER_SIZE which is quite large. <...>