From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by dpdk.org (Postfix) with ESMTP id 981D32E81 for ; Thu, 25 Oct 2018 07:30:28 +0200 (CEST) Received: by mail-ed1-f66.google.com with SMTP id b7-v6so7200818edd.9 for ; Wed, 24 Oct 2018 22:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b40SPdppfcj5rBlWAs1J5PPOE2Jux12J66s+ptjn6bA=; b=2BoMfQfe77ELWPh4BTVaAgeBxAh9aX+1HdKIdbM8rQNawWDXHhkE8DfsJhUV+U3GRR iT7quCb8Q7+KQmt44VG1xz6RP0FCsTEpnl53X893tFj9NVlzSK6WbgfnoDIUeqrRWUIg 7GbePikHzCIUWhF6+nPI00mcSOgAeSEkunOGUBrN/UeZwf2cYkkxhaD9vhhUXjXKUpxa r/BF0OUi8z2DRAZJPYF/uJ+Jgxz2S9IjmNWIT5LQsqbew27jYJRO9vAZNAsZ/nRW+3iY mKjOBH20NT5DggM9J886Wv+gb2rvWjE1v3IYGkt+pdWGZLx6OuvXdGnm2Q2uvp8SRfhv GzWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b40SPdppfcj5rBlWAs1J5PPOE2Jux12J66s+ptjn6bA=; b=ReJiEDQZv6cHa9L7RhJCN94/iYW4xskORnPJma9KH3VRdOwyo8WGa7N+pNx7WTxkfR eQrRMcM86iEBavxqTQEzZEMp/DGuTFNGRF3M3VQXZowtb0+1QVVWzDP4wILJoRLLAjkx g2236vz9JUuv/gcSBNrFWFBGwl/7YwDkpswQohQabOCNztgplTQqnrgqgZb5fpZI1MhK 1KA2ClUzawRsQ/LvWJ1ox7CzCGuwWFudqgwx4XMzyRk9mm2w6KYXeDCOVz1Cb+iaVXN1 JqZ33DGmC28YsqWSzBNIsOy7/zWpB+14GB8vCMqdgvtQUTiTuE2ysWFYItzAunRht5nL Qbvw== X-Gm-Message-State: AGRZ1gL0JOKHXDn7I3i+SMEgBCNhWynHdP4ojEt8XLWoXnwT+P+KAznp ktFZ/tu16VpYHahYmB7Y6bJohM0r3vXX+LESEjPHxw== X-Google-Smtp-Source: AJdET5eP4YSujiY6pWh7Z7kWqSkbtM2xVaUX9HHbtyplE2MJc3NGD3QujqqXziqL6/YPBiTCGAKj8OqPXBkhd/UOsjk= X-Received: by 2002:a17:906:92d6:: with SMTP id d22-v6mr304313ejx.96.1540445428232; Wed, 24 Oct 2018 22:30:28 -0700 (PDT) MIME-Version: 1.0 References: <1539967418-17824-1-git-send-email-alejandro.lucero@netronome.com> <1926208.EzcMdV4ig2@xps> In-Reply-To: <1926208.EzcMdV4ig2@xps> From: Alejandro Lucero Date: Thu, 25 Oct 2018 06:30:17 +0100 Message-ID: To: Thomas Monjalon Cc: dev , Gaetan Rivet Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Thu, 25 Oct 2018 05:30:28 -0000 On Thu, Oct 25, 2018 at 12:11 AM Thomas Monjalon wrote: > 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? > > Because it is not needed. VFIO is present if the kdrv field tells us so. > > - 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; > > } > > > >