From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by dpdk.org (Postfix) with ESMTP id 39CCC2E83 for ; Wed, 10 Feb 2016 12:38:40 +0100 (CET) Received: by mail-ob0-f177.google.com with SMTP id wb13so23039560obb.1 for ; Wed, 10 Feb 2016 03:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ZiNzwAZLaBFhaz4QqqNaeG9KGakZ5RqfO58qFwzeLfc=; b=Yzt16hCA9/hpad4cQbnHyBnqMOlMMz5jz8qdItzkFuOcHyUVHKP+2Yj80nTwK6ujVb gMBtpiyxtSUJz3brdlrYgH8xbgw1VE5FMFf0G+R8ex6fYtb2+BuN6VydFzdxKIAbgnoG n/Q42fBHhcy3gz9hDVvRQbU8fSW/oKSrgalRJ/VgtEWg03lbOq0HdViU+cEWnShFjbZi q3R7qMKRiPxnuw5rWB6+2CQ59dv3cvKWWVAIKXbdylNaO8MearvJ3UE6XRfF1fFlHPg6 iqSutzjNdbuWYQEsPq/pBxMzy1qSW0KtEVmj30wmfSQgplIhHXaSqwTsjWQOSQryGEAs ye9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=ZiNzwAZLaBFhaz4QqqNaeG9KGakZ5RqfO58qFwzeLfc=; b=cGcu0+73OMfjbE03w3Mms9uYDLNjhjBMqB9tjADduQZoGRt+TZ+d/KJPw45i3jCy2F Rr54XPqWFtO62K/lNa03bo5zf/1KcKi3AsBJu5rOOm5u8/OmSWMHdFF1FgER1kI6n9an aPu8xniXkskFhnIDeSpxx+ntY28cd1kMOYV4NeXiiRMaeH+1bh9G/+cZi/xfbXuGKzHj ogv49Es+lOySKCefZ89qZELJdZ+rUX0Qa8WFWpytOh87E6Sgxh/FDs7e81VtDn4Zj3Eg H0V5xgWH2J96YbklSs1fQcf+IW1UODuZHRo+ZbA7PUBd359qSArGSmB27jyZMGJo2phw L6Kw== X-Gm-Message-State: AG10YOR64S0BdW+fuJX8I0zQx/3IyvfS0Qk+8gRSMPJl6d88epjoVc1PihXtnQ3XX9R6rWh7eH0FsgIDRsZ5h1vI X-Received: by 10.60.59.37 with SMTP id w5mr17516609oeq.44.1455104319556; Wed, 10 Feb 2016 03:38:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.180.72 with HTTP; Wed, 10 Feb 2016 03:38:20 -0800 (PST) In-Reply-To: <20160210112028.7d1004a0@pcviktorin.fit.vutbr.cz> References: <1454076516-21591-1-git-send-email-david.marchand@6wind.com> <1454076516-21591-4-git-send-email-david.marchand@6wind.com> <20160209180555.3ad379cf@pcviktorin.fit.vutbr.cz> <20160210112028.7d1004a0@pcviktorin.fit.vutbr.cz> From: David Marchand Date: Wed, 10 Feb 2016 12:38:20 +0100 Message-ID: To: Jan Viktorin Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 3/9] drivers: no more pdev drivers 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: Wed, 10 Feb 2016 11:38:40 -0000 On Wed, Feb 10, 2016 at 11:20 AM, Jan Viktorin wrote: > On Wed, 10 Feb 2016 10:27:14 +0100 > David Marchand wrote: >> #define RTE_EAL_PCI_REGISTER(name, d)\ >> void pciinitfn_ ##name(void);\ >> void __attribute__((constructor, used)) pciinitfn_ ##name(void)\ >> {\ >> rte_eal_pci_register(d);\ > > I meant > rte_eal_pci_register(&(d)->pci_drv);\ > > Perhaps, my assumption that a PCI driver is always referred as pci_drv is wrong... Well, I suppose we will always have a pci driver embedded in some other internal pmd structure. So we can always expect it to be called pci_drv ... Btw, for drivers like mlx or virtio that need to do some more stuff in their constructor (the iopl stuff for virtio is the most interesting case, since the pci register happens only if iopl succeeded), we might need some RTE_MODULE_INIT for those. But in such a case, I think having RTE_MODULE_INIT in all pmds would make more sense, and RTE_EAL_PCI_REGISTER looks unneeded ? -- David Marchand