From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 6D9DA960D for ; Mon, 20 Jun 2016 14:59:34 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id r190so10353389wmr.0 for ; Mon, 20 Jun 2016 05:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=cVAhZ9VMDfUoE22BfxbRe72HWQBikxvXtAMDG+pk3Uk=; b=GpcSxWwDLAgGqaDXhB5ynzI2p2Kh/O3ht1zBvSMFNg8cBbCK+rvDeYaMJfauiv+82l UDd3Xi9kwlSmKQRXrmdB5sLjd3oXT2303PsI/76hTTTEzSZLE4k5q5X4w0erwbcOzg6k Vqwa9QTAxK+nIjgk0BmA0ZibGntMCtwxv5xAv5ZS8mzuW0s6jfu9tpbRBohKm7gWjiOW +WEPSDj1LVszFG/2dKLK5jTw//umuaFCaKq8pNmmDRXtV78MR6YkJV2P2XvV4LBgHSg7 NW9KoMGphbl3qbvvXaNvfWXgH3SJBx+b+AxraIvQxxG4uCibwytH5E7oQa6YsuoZUNM7 Yiuw== 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:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=cVAhZ9VMDfUoE22BfxbRe72HWQBikxvXtAMDG+pk3Uk=; b=C37uxOmZopFNs1KZ6KnoY/RHH0TnlX1I2DjIwvYjCU7w5kbu6Os/1nGDU0LwSnVa4D U1cIj5AAuop83ncG+eVMmiEraur3teujQmSEpaVGFkLqslIdMlIwsqQPJg2YjjeWWpdh yeHiBT7p4oW+3bCdO7mxuubsl3OdHOjeAb63HHbf7ZytL41OTy4+/xrSNiWjygRtZ+cX MQukGM+iDbcr8m4r6143IeYHDMU/oOpIiNTZnIohB3ZXpbz6xca42ecADKKnitENYzIb zLl88yvuiTKp6yw9hIaQLhrN8e0uzP0I5IBMFBexboQ1TML1MYyVm28G/k/YMQPZnjwR wWGQ== X-Gm-Message-State: ALyK8tJQUogaAeCo6HqlSVyFHNMAiLjcKuULWcSEYzw7iaqkuxOISB/jW0PwTF/Hsl5Wpa4j X-Received: by 10.194.86.70 with SMTP id n6mr16439976wjz.154.1466427567775; Mon, 20 Jun 2016 05:59:27 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id f189sm3764123wmf.19.2016.06.20.05.59.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 05:59:24 -0700 (PDT) From: Thomas Monjalon To: Jerin Jacob Cc: "Jain, Deepak K" , dev@dpdk.org, "Griffin, John" , "De Lara Guarch, Pablo" , "Doherty, Declan" , Adrien Mazarguil , Nelio Larenjero , alejandro.lucero@netronome.com Date: Mon, 20 Jun 2016 14:59:21 +0200 Message-ID: <8168457.L01VhZbAK5@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160617094241.GA32149@localhost.localdomain> References: <1466090950-12231-1-git-send-email-deepak.k.jain@intel.com> <7138878.rfgI980QT2@xps13> <20160617094241.GA32149@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] qat: fix for VFs not getting recognized 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: Mon, 20 Jun 2016 12:59:35 -0000 2016-06-17 15:12, Jerin Jacob: > Thunderx nicvf also got the same problem when I rebased to > dpdk-next-net/rel_16_07. > > The root cause for this issue is that, PCI CLASS_ID EAL add > changeset(701c8d80c820461e8255dfb7387a09f0e54399f0) > has taken care only the pci devices where id table is created > with RTE_PCI_DEVICE > > For other devices, class_id comes as 0 instread of RTE_CLASS_ANY_ID and > probe failes. To fix it, > > one option is to add RTE_CLASS_ANY_ID for the devices where pci id table is not > created with RTE_PCI_DEVICE > > or > > somewhere in common-code in the initaization set if class_id = 0 then make it as > RTE_CLASS_ANY_ID(Thats would be a hack). > > Seems like first option is correct-way to fix the problem? Any thoughts? The best fix is to use RTE_PCI_DEVICE. If we want to set the class id, we can add a new macro RTE_PCI_ID(class, vend, dev) or maybe RTE_PCI_NET_ID(vend, dev) and RTE_PCI_CRYPTO_ID(vend, dev) > looks like following devices does not exhibit this issue > > [dpdk-thunderx] $ grep -r "RTE_PCI_DEVICE" drivers/ > drivers/net/szedata2/rte_eth_szedata2.c: > drivers/net/bnx2x/bnx2x_ethdev.c > drivers/net/vmxnet3/vmxnet3_ethdev.c > drivers/net/enic/enic_ethdev.c > drivers/net/e1000/em_ethdev.c > drivers/net/ena/ena_ethdev.c > drivers/net/qede/qede_ethdev.c > drivers/net/ixgbe/ixgbe_ethdev.c:#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, > drivers/net/virtio/virtio_ethdev.c:#define > drivers/net/i40e/i40e_ethdev.c:vend, Going further: pci=$(git grep -l rte_pci drivers | cut -d/ -f3 | sort -u) ok=$(git grep -l RTE_PCI_DEVICE drivers | cut -d/ -f3 | sort -u) printf "$pci\n$ok\n$ok" | sort | uniq -u | sed '/^$/d' bonding mlx4 mlx5 nfp qat It seems we need to fix qat, nfp and mlx.