From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <david.marchand@6wind.com>
Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com
 [209.85.214.175]) by dpdk.org (Postfix) with ESMTP id 5223E2A5D
 for <dev@dpdk.org>; Wed, 10 Feb 2016 09:52:07 +0100 (CET)
Received: by mail-ob0-f175.google.com with SMTP id is5so18251116obc.0
 for <dev@dpdk.org>; Wed, 10 Feb 2016 00:52:07 -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=hXD0d/jPNWF/iwCPA/ttDR9kA0dsAU8VuXKz/cfCibg=;
 b=t7hzFPVNpsLLeYo/Ac02ChQshBWY+4P9Wv3VN2zpzdypdvzxrcT5ZvPquFCegHAMLy
 QoM9MBXXoNuZqC3vZFG/GTDTAFrJ96TcZhS++jq3dEK0kDp6Qn+j6wgHqeawD8/xr2Es
 ukqJJRm9p1fMA4zUbTH5tMOozbZKXHVbsv/G7GNf/y5DkC8y9vpfe9/jr9KVaGwIYXla
 CD7+Y9d58oWGONHK3Btrv0Htbi75jD1SiwpX+kSPWz4we+vieiHn1jp+ggigtVTAsojd
 mhoeCb8TyPtlH8BBKMCrDwtyuhUr6yW70nwu9sAQ1zPtBuJ1HVens9ACvw1BKWH1n0pU
 t3fA==
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=hXD0d/jPNWF/iwCPA/ttDR9kA0dsAU8VuXKz/cfCibg=;
 b=OO8aTO/yaWADXZRrZscXYBlu9MahPm9cTM1OYtz2us2o2uKDtXcU4gpzJR/wtJlwxa
 //k3d0i/LQUOwzh6NkerX17zP31Vs/8Ix0pkqorkWSZBABPpB2GCYL5Q9NVbwj9WRaOc
 TTKw28l+UYJ8QvyT7phFw/QgxMIkCp6PlS0NAii+OAp1lQC9pDrG1ZbOiE4twBaoE4CB
 zYKixF1YFOvT3LwYmPZ/a7PYeN0sJin5RG8RNxnmwW7V9oxDmpL6cgZrbzRixlbdTe6b
 hFwHkhS325riiqyVWoPkbih/Tqr/VYEETafBMyV1qQ7nqGFCv4wvloRc7hPtHkkJuy1r
 prQA==
X-Gm-Message-State: AG10YOS7ilwQVlPX6mJmwniGMCV+BGsWSu30f4b87Tns1LjTuIWFwrTsv524oYV0UN2766n+yymM2mr7BwMiSdUO
X-Received: by 10.60.127.166 with SMTP id nh6mr34458123oeb.64.1455094326824;
 Wed, 10 Feb 2016 00:52:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.76.180.72 with HTTP; Wed, 10 Feb 2016 00:51:47 -0800 (PST)
In-Reply-To: <20160209180555.3ad379cf@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>
From: David Marchand <david.marchand@6wind.com>
Date: Wed, 10 Feb 2016 09:51:47 +0100
Message-ID: <CALwxeUs8zro1cM2zFVRmmEViwY8P=+s8L_6TOCOqf=w-ohscOw@mail.gmail.com>
To: Jan Viktorin <viktorin@rehivetech.com>
Content-Type: text/plain; charset=UTF-8
Cc: "dev@dpdk.org" <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 <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: Wed, 10 Feb 2016 08:52:07 -0000

On Tue, Feb 9, 2016 at 6:05 PM, Jan Viktorin <viktorin@rehivetech.com> wrote:
> Maybe, a better subject?
>
> drivers: init pdev drivers in constructors

Why not, I will try to find a best one, and if I can't, I will go with this.

> On Fri, 29 Jan 2016 15:08:30 +0100
> David Marchand <david.marchand@6wind.com> wrote:
>> -static int
>> -rte_qat_pmd_init(const char *name __rte_unused, const char *params __rte_unused)
>> +/* Driver registration */
>> +static void __attribute__((constructor, used))
>> +rte_qat_pmd_init(void)
>>  {
>>       PMD_INIT_FUNC_TRACE();
>>       rte_eal_pci_register(&rte_qat_pmd.pci_drv);
>> -     return 0;
>>  }
>> -
>> -static struct rte_driver pmd_qat_drv = {
>> -     .type = PMD_PDEV,
>> -     .init = rte_qat_pmd_init,
>> -};
>> -
>> -PMD_REGISTER_DRIVER(pmd_qat_drv);
>
> What about introducing a macro for this?
>
> RTE_REGISTER_PCI_DRIVER(rte_qad_pmd);

Yes.


-- 
David Marchand