From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: mlx5 under FreeBSD Date: Mon, 19 Nov 2018 09:08:10 -0800 Message-ID: <20181119090810.02543f44@xeon-e3> References: <1203238912.103536.1542300483728.JavaMail.zimbra@perftech.com> <4060784.NMgGY7Cv01@xps> <164311280.707048.1542583391811.JavaMail.zimbra@perftech.com> <383796151.782033.1542640162186.JavaMail.zimbra@perftech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: shahafs , Thomas Monjalon , dev , Yongseok Koh To: Mit Matelske Return-path: Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by dpdk.org (Postfix) with ESMTP id 852992C52 for ; Mon, 19 Nov 2018 18:08:19 +0100 (CET) Received: by mail-pg1-f177.google.com with SMTP id n2so6927944pgm.3 for ; Mon, 19 Nov 2018 09:08:19 -0800 (PST) In-Reply-To: <383796151.782033.1542640162186.JavaMail.zimbra@perftech.com> 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 Mon, 19 Nov 2018 09:09:22 -0600 (CST) Mit Matelske wrote: > > Monday, November 19, 2018 1:23 AM, Mit Matelske: > >> Subject: Re: [dpdk-dev] mlx5 under FreeBSD > >> > >> > 15/11/2018 17:48, Mit Matelske: > >> >> Is anyone working to include support for the mlx5 PMD under FreeBSD? > >> > > >> > I think Stephen (Cc) looked at it. > >> > > >> >> I've started down this road by building Linux compatibility layers > >> >> for the required Netlink and Ethtool calls in the driver, but would > >> >> gladly accept help and advice from those much more knowledgeable then > >> myself! > > > > Are you sure netlink and ioctl is all you need? > > Looks like also sysfs stuff, and I am not sure what else is missing from the > > DPDK eal layer, the FreeBSD has many not supported functions. > > No, I'm not sure of anything. I've just started focusing on this. I do know to > get it to compile I had to include subsets the following includes: > > libmnl/libmnl.h > linux/ethtool.h > linux/netlink.h > linux/neighbour.h > linux/types.h > linux/rtnetlink.h > linux/pkt_cls.h > linux/pkt_sched.h > linux/if_ether.h > linux/tc_act/tc_gact.h > linux/tc_act/tc_mirred.h > > My initial goal is to change the DPDK code as little as possible, but that > might not be be possible. You'd have a much better feel for that than me > at this point. > > > > > We haven't started to work on it because the majority of our use cases are for > > Linux. > > I figured as much. > > > Nevertheless, we can help with code reviews and guidance. > > Once I get somewhere I will definitely take you up on that. > > Thanks! > > Mit > > > > >> > > >> > Cc also mlx5 maintainers. > >> > >> Thomas- > >> > >> Thanks for looping the correct people in! > >> > >> > > >> >> Though not important, why did Mellanox build a PMD that relied on the > >> >> kernel driver being in place unlike most other PMDs? > >> > > >> > Because it allows to choose which flows go to DPDK and which ones are > >> > processed by the kernel. > >> > Actually, you should ask why other PMDs don't have this feature ;) > > > > +1. > > > >> > >> Very fair response. We actually wrote our own "shim" into the stack for all > >> the relevant drivers we use to both keep the existing ifnet interfaces around > >> and to pass packets to and from the stack from every interface. > >> > >> Your comment matches one of my co-worker's when I explained to him how > >> the mlx5 driver works. > >> > >> Mit > >> Rather than building a complex shim, why not just have an OS dependent section of the driver. The bigger issue is that the kernel side functionality in BSD is different or missing. For example TAP API is different and not multi-queue.