From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id EB48237B8
 for <dev@dpdk.org>; Fri, 16 Dec 2016 15:20:02 +0100 (CET)
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by fmsmga105.fm.intel.com with ESMTP; 16 Dec 2016 06:20:02 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.33,357,1477983600"; d="scan'208";a="43357368"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29])
 ([10.237.220.29])
 by fmsmga006.fm.intel.com with ESMTP; 16 Dec 2016 06:20:00 -0800
To: Neil Horman <nhorman@tuxdriver.com>, Olivier Matz <olivier.matz@6wind.com>
References: <1479808257-8725-1-git-send-email-olivier.matz@6wind.com>
 <1481809599-27896-1-git-send-email-olivier.matz@6wind.com>
 <20161215160912.GA4450@neilslaptop.think-freely.org>
 <20161215092207.168ba141@xeon-e3> <20161216102208.08955321@platinum>
 <20161216123738.GA2255@hmsreliant.think-freely.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org,
 thomas.monjalon@6wind.com, vido@cesnet.cz, fiona.trahe@intel.com,
 adrien.mazarguil@6wind.com
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <ead3cf82-9108-69a4-0fd7-ee3babbb178c@intel.com>
Date: Fri, 16 Dec 2016 14:19:59 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.5.1
MIME-Version: 1.0
In-Reply-To: <20161216123738.GA2255@hmsreliant.think-freely.org>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH v3] drivers: advertise kmod dependencies in
 pmdinfo
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Dec 2016 14:20:03 -0000

On 12/16/2016 12:37 PM, Neil Horman wrote:
> On Fri, Dec 16, 2016 at 10:22:08AM +0100, Olivier Matz wrote:
>> Hi,
>>
>> On Thu, 15 Dec 2016 09:22:07 -0800, Stephen Hemminger
>> <stephen@networkplumber.org> wrote:
>>> On Thu, 15 Dec 2016 11:09:12 -0500
>>> Neil Horman <nhorman@tuxdriver.com> wrote:
>>>
>>>> On Thu, Dec 15, 2016 at 02:46:39PM +0100, Olivier Matz wrote:  
>>>>> Add a new macro RTE_PMD_REGISTER_KMOD_DEP() that allows a driver
>>>>> to declare the list of kernel modules required to run properly.
>>>>>
>>>>> Today, most PCI drivers require uio/vfio.
>>>>>
>>>>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>>>>> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
>>>>> ---
>>>>>
>>>>> v2 -> v3:
>>>>> - fix kmods deps advertised by mellanox drivers as pointed out
>>>>>   by Adrien
>>>>>
>>>>> v1 ->
>>>>> v2:                                                                                                
>>>>> - do not advertise uio_pci_generic for vf drivers
>>>>> - rebase on top of head: use new driver names and prefix
>>>>>   macro with
>>>>> RTE_                                                                                       
>>>>>
>>>>> rfc -> v1:
>>>>> - the kmod information can be per-device using a modalias-like
>>>>>   pattern
>>>>> - change syntax to use '&' and '|' instead of ',' and ':'
>>>>> - remove useless prerequisites in kmod lis: no need to
>>>>>   specify both uio and uio_pci_generic, only the latter is
>>>>>   required
>>>>> - update kmod list in szedata2 driver
>>>>> - remove kmod list in qat driver: it requires more than just
>>>>> loading a kmod, which is described in documentation
>>>>>
>>>>>  buildtools/pmdinfogen/pmdinfogen.c      |  1 +
>>>>>  buildtools/pmdinfogen/pmdinfogen.h      |  1 +
>>>>>  drivers/net/bnx2x/bnx2x_ethdev.c        |  2 ++
>>>>>  drivers/net/bnxt/bnxt_ethdev.c          |  1 +
>>>>>  drivers/net/cxgbe/cxgbe_ethdev.c        |  1 +
>>>>>  drivers/net/e1000/em_ethdev.c           |  1 +
>>>>>  drivers/net/e1000/igb_ethdev.c          |  2 ++
>>>>>  drivers/net/ena/ena_ethdev.c            |  1 +
>>>>>  drivers/net/enic/enic_ethdev.c          |  1 +
>>>>>  drivers/net/fm10k/fm10k_ethdev.c        |  1 +
>>>>>  drivers/net/i40e/i40e_ethdev.c          |  1 +
>>>>>  drivers/net/i40e/i40e_ethdev_vf.c       |  1 +
>>>>>  drivers/net/ixgbe/ixgbe_ethdev.c        |  2 ++
>>>>>  drivers/net/mlx4/mlx4.c                 |  2 ++
>>>>>  drivers/net/mlx5/mlx5.c                 |  1 +
>>>>>  drivers/net/nfp/nfp_net.c               |  1 +
>>>>>  drivers/net/qede/qede_ethdev.c          |  2 ++
>>>>>  drivers/net/szedata2/rte_eth_szedata2.c |  2 ++
>>>>>  drivers/net/thunderx/nicvf_ethdev.c     |  1 +
>>>>>  drivers/net/virtio/virtio_ethdev.c      |  1 +
>>>>>  drivers/net/vmxnet3/vmxnet3_ethdev.c    |  1 +
>>>>>  lib/librte_eal/common/include/rte_dev.h | 25
>>>>> +++++++++++++++++++++++++ tools/dpdk-pmdinfo.py
>>>>> |  5 ++++- 23 files changed, 56 insertions(+), 1 deletion(-)
>>>>>     
>>>> Its odd that all devices, regardless of vendor should depend on the
>>>> igb_uio module.  It seems to me that depending on uio_pci_generic
>>>> or vfio is sufficient.
>>
>> igb_uio is the historical uio module of dpdk. Although it is called
>> igb_uio, it is not specific to Intel drivers.
>>
>> Most drivers declare "igb_uio | uio_pci_generic | vfio", which means
>> that any of the 3 kernel modules can be used.
>>
>> I think there are some cases where people will prefer using igb_uio,
>> for instance to use a vf pmd in a vm where there is no iommu,
>> and where the kernel vfio module does not support the no-iommu mode.
>>
>>
>>>
>>> Yes it seems just a special case extension for Mellanox drivers.
>>
>> Kmod deps are different whether it's a vf driver or not.
>> Mellanox drivers are not the only drivers that do not require uio,
>> there is also szedata2.
>>
>> Is it an argument for not including this patch?
>>
> Speaking only for myself, I'm not suggesting the patch not be included, only
> questioning the need to list igb_uio as an optional dependency.  From what I
> understand uio_pci_generic is equaly capable of being used in a vf as igb_uio,
> and so it seems like its sufficient to list in the deps alone, or am I missing
> something?
> 
> Additionally, in regards to the comment about rebasing on net-next here, I don't
> think thats needed.  This patch is built such that you will be able to apply
> this tag to additional drivers later, as they get merged into thomas's tree, you
> don't need to get them all in one shot.

Right, more drivers can be added later. But also I don't see any problem
if this patch rebased on next-net and be a more complete patch. That is
why it was a question to the author.

> More to the point, there are crypto
> drivers that may make use of this module dependency tag, and those are also
> missing.  I would suggest taking the patch based on it current state (once the
> above igb_uio issue is settled), and then adding the tag to new drivers in
> subsequent releases as they get merged.
> 
> Neil
> 
>>
>> Regards,
>> Olivier
>>