From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id BC75725B3 for ; Thu, 25 Oct 2018 01:11:38 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 50B4521F2A; Wed, 24 Oct 2018 19:11:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 24 Oct 2018 19:11:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=5dPtDx1EMIYi6h6PPVuhneZ0ftU7JdkGbCtSl9k5/uo=; b=NxsQkPvIwxOr MPI5c6RcclIfiysvsHRrY0N1FEbhc9Y6fOrxsuv46MyWFaRqhfFy2HgAwSQ6xO6q M/vu+0umLeMbNBPps2HULZe8O3tURXRJmbU8eEIru2+seFzQQF90Y6NEcEOvNuIx /etujBgXGwVEQ5X+uRHQBdqd1ZcMKt8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=5dPtDx1EMIYi6h6PPVuhneZ0ftU7JdkGbCtSl9k5/ uo=; b=lXxN7PyH5Sqk+yF+u149vz+vrECo42U+m5WTuO9pawZVZpO6941gFqD3t k+aVi6+54+XGBmACoQkfM+I3EJ566RrdQzJ7mIfLPAGGL75Ygn5wJRZEU3fTlQ34 c8PSByIkR/yhuNeeu8gy3YUl82ZHmC7qF4lD/U6SbSYp+eZkYiPG08pGv0CloNBa Wp7/ekrFpWcW/HG9AVcAB8L1KRhYcDdTDwT4FdqSHWMocese+fOJKYHeA45Yk1MI zTyBvUXghmWjic4OalDN7Ao330abUaRWV5PoCy3HCfj7aCiAzuQQUXZUB19tKhde 8JJy5VWb4Yspy5iF/ccpkzrcEwTQw== X-ME-Sender: X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4EC50102E9; Wed, 24 Oct 2018 19:11:37 -0400 (EDT) From: Thomas Monjalon To: Alejandro Lucero Cc: dev@dpdk.org, gaetan.rivet@6wind.com Date: Thu, 25 Oct 2018 01:11:39 +0200 Message-ID: <1926208.EzcMdV4ig2@xps> In-Reply-To: <1539967418-17824-1-git-send-email-alejandro.lucero@netronome.com> References: <1539967418-17824-1-git-send-email-alejandro.lucero@netronome.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] bus/pci: use device driver name instead of handler type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 23:11:39 -0000 Hi, 19/10/2018 18:43, Alejandro Lucero: > --- a/drivers/bus/pci/linux/pci.c > +++ b/drivers/bus/pci/linux/pci.c > + char devname[RTE_DEV_NAME_MAX_LEN] = {0}; I think "" would be more appropriate than {0}. > const struct rte_intr_handle *intr_handle = &device->intr_handle; > > - switch (intr_handle->type) { > - case RTE_INTR_HANDLE_UIO: > - case RTE_INTR_HANDLE_UIO_INTX: > + switch (device->kdrv) { > + case RTE_KDRV_IGB_UIO: > return pci_uio_read_config(intr_handle, buf, len, offset); > - > -#ifdef VFIO_PRESENT Why this #ifdef is removed? > - case RTE_INTR_HANDLE_VFIO_MSIX: > - case RTE_INTR_HANDLE_VFIO_MSI: > - case RTE_INTR_HANDLE_VFIO_LEGACY: > + case RTE_KDRV_VFIO: > return pci_vfio_read_config(intr_handle, buf, len, offset); > -#endif > default: > + rte_pci_device_name(&device->addr, devname, > + RTE_DEV_NAME_MAX_LEN); > RTE_LOG(ERR, EAL, > - "Unknown handle type of fd %d\n", > - intr_handle->fd); > + "Unknown driver type for %s\n", devname); > return -1; > }