From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 35653AE99 for ; Tue, 15 Apr 2014 10:15:51 +0200 (CEST) Received: by mail-wi0-f171.google.com with SMTP id q5so5239271wiv.4 for ; Tue, 15 Apr 2014 01:15:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=dGyO8nwOsrLEtIhI3Kv7R5Rjhpp+Mx2wt/d6oBrEt/c=; b=GNByM5y7Pw2Tw0X1SXAPL/l6WMusLZtN8d84rp+aLyheh4YS4+N9qBeSHqCVCd7zjh 5d64KhWC+8KfxUkii8D5knvU5ONDAoAwSHXvgmSZjMY5E6NCYvtxMzc89ZQYB4KxM72k qhxhuU86WvzJGR9mxifhPVkIpTQbMEIbvqaSEc2gWitEVyYIb3jCBFqjzsXja9qXF24P beGQosAnXwo1JVsmnBD2pvWMStNC2lamdgUUppCRX3u+nMDLp7ckqF3AlRr9mC47ZSBg M0X/WLYyNHlU+Tn8Y7ibyfHUS04NsWMASLs34ZAj1VAvdNIdUMQaRKU2WCvIyptNcrYV zlGg== X-Gm-Message-State: ALoCoQnSS7gX5NwAKEgf5f06BcaTHtQK9+A56e2U6ls98F4Ts0Nnp8YCntxw7lQmhv3JWt6I9SxZ X-Received: by 10.180.98.165 with SMTP id ej5mr1271951wib.33.1397549751181; Tue, 15 Apr 2014 01:15:51 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id or5sm28664871wjc.2.2014.04.15.01.15.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Apr 2014 01:15:50 -0700 (PDT) From: Thomas Monjalon To: "Burakov, Anatoly" Date: Tue, 15 Apr 2014 10:15:51 +0200 Message-ID: <4976678.CMXOgFkiV5@xps13> Organization: 6WIND User-Agent: KMail/4.12.3 (Linux/3.13.7-1-ARCH; KDE/4.12.3; x86_64; ; ) In-Reply-To: References: <534BEE72.4070205@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 0/3] remove RTE_EAL_UNBIND_PORTS related code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 08:15:51 -0000 Hi Anatoly, 2014-04-14 14:39, Burakov, Anatoly: > > This functionality is at least used by virtio-net-pmd. > > So we cannot remove this without a fix for virtio-net-pmd. > > It appears that virtio-net-pmd hasn't been merged in yet? At least I can't > see it in the git tree for 1.6 release. Maybe you don't know the history of the project. virtio-net-pmd was the first PMD for virtio. It has been released out of tree. Then Intel designed another one based on uio and released it in the DPDK tree. On this topic, you should know that some parts of virtio-uio are (wrongly) integrated in EAL. So it seems to be a bad idea to integrate PMDs in DPDK tree. virtio-net-pmd is hosted outside of the git tree: http://dpdk.org/browse/virtio-net-pmd > > Yet, even if we remove this from the eal, I think we should provide a > > proper api to bind/unbind devices to kernel drivers. > > This way PMDs can use this api and forget about OS dependencies > > (linux/bsd). > > Please forgive me for repeating myself, but I'm still not convinced that > binding/unbinding the kernel drivers has to be the responsibility of the > application in the first place. As far as I know, the reasons why the > binding/unbinding code was there are purely historical and have no > rationale behind them other than "this is how it was first implemented". > Plus, correct me if I'm wrong, but FreeBSD has some issues with port > binding/unbinding - i.e. it can't do that at all, at least during runtime, > so on BSD it's even less of an issue. I understand your point of view. I think everybody agree that EAL should not force binding/unbinding operations. But it could be very convenient to allow PMDs to do it by themselves. Do you agree that the David's version is a good step in the right direction as it allows to remove RTE_EAL_UNBIND_PORTS? If so, could you ack these patches, please? Then we could discuss what are the next steps. > Anyway, the reason I'm bringing this subject up in the first place is I'm > preparing a patch to support VFIO driver alongside igb_uio. Among the > changes I'm preparing to make is getting rid of the device ID list in > igb_uio, so that any driver could be bound to it (via writing to new_id) - > i.e. making it similar to how pci_stub, vfio-pci et al work. A consequence > of that will be that igb_uio won't try to bind any devices unless the user > explicitly asks for it, meaning that the virtio device will not be bound to > igb_uio by default. I think this will remedy the issues with virtio-net-pmd > without the need for force-unbind logic in the EAL. virtio-net-pmd doesn't need any kernel driver. Moreover, the virtio-net kernel driver must be unbound. It can be done before running DPDK but it's simpler to do it in the PMD initialization. By the way, we should remove this flag FORCE_UNBIND. But please, let's do it in another step. -- Thomas