From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 211852BF9 for ; Wed, 20 Apr 2016 15:40:19 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id 127so11626957wmz.0 for ; Wed, 20 Apr 2016 06:40:19 -0700 (PDT) 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; bh=PBEF+STv/ZiXN/A002M54kOSZAw22B9enxSu1Lj8Z6A=; b=vX9vtt2C1bOoTfYKakIrEWC7yoLHDlmtIahp6HHsHNlELQXG6nzpn2SlUhoELJFw63 +q3qgNyuWM73DEAC1LBirXJnWLWsV6QGnzkl+j0welAD1CNGsdq4hlsGZxoIAJl/7vEX cqjt3V47f9H+5Ig5NxdkEbo4fl5BIghhkk/8oaitb3UFkGRkJQjkU/8afeIL2F9C5P3h EVpINMRftZRfdWIsFRfgiF9OR6wo10cGDdexUBjLa3c5Efgt6/VGrgWOU1hCB4DtCXt+ 6qwmUcG5hwW0fNGBdwMu0i84Nba423FDL/br42+kIg51JgVtr5+LUhF3Ubmn4FR8tK5l Y7cA== 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; bh=PBEF+STv/ZiXN/A002M54kOSZAw22B9enxSu1Lj8Z6A=; b=GHkHzVEtVlfukXXNZyd1dRzysKgGRqxLV5PnP9jXJKk6MGIMSbxLBzwueeL8T06TC7 pvzIyWDQGXhIzJIecFgwwKc+DvXoI0eXScH4jrKBlsTDkSZWINXpn+s3vIx9MuVtcqNj bScm8Y1eTY8Zl3Ndfk9RuXTHt763b8sIupf5m0yoKBX9fq5PovswjKVGPz/FCIrTqRfO 5rX23p6+Wt3YS76UYjwr6N9ZNGozwcewGF+XJkTYoO62MzFR61jQ2bFPUB4I7Mbh53dA Zh2oJgvaNZMDgdenUPy79IApT31U4QeWxT4wlKGd5x+DZi/WUS4RsOdRIL1cCQiaZIRt AlXA== X-Gm-Message-State: AOPr4FVEs/bkF8TOH51fRxzWSNiBNy9i15vMRemvHfkXTL0uGMiniBnoP70sRqbkeUuDUL9ngMDPC3r5ciIUHNYj X-Received: by 10.28.140.12 with SMTP id o12mr30061720wmd.19.1461159618933; Wed, 20 Apr 2016 06:40:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.96.2 with HTTP; Wed, 20 Apr 2016 06:39:59 -0700 (PDT) In-Reply-To: <20160420132908.GA21072@hmsreliant.think-freely.org> References: <1453120248-28274-1-git-send-email-david.marchand@6wind.com> <1461156236-25349-1-git-send-email-david.marchand@6wind.com> <1461156236-25349-2-git-send-email-david.marchand@6wind.com> <20160420132908.GA21072@hmsreliant.think-freely.org> From: David Marchand Date: Wed, 20 Apr 2016 15:39:59 +0200 Message-ID: To: Neil Horman Cc: "dev@dpdk.org" , Thomas Monjalon , Stephen Hemminger , "Richardson, Bruce" , Panu Matilainen , christian.ehrhardt@canonical.com, Wenzhuo Lu Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver 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, 20 Apr 2016 13:40:19 -0000 On Wed, Apr 20, 2016 at 3:29 PM, Neil Horman wrote: >> +#ifndef RTE_PCI_DEV_ID_DECL_EM >> +#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) >> +#endif >> + >> +#ifndef PCI_VENDOR_ID_INTEL >> +/** Vendor ID used by Intel devices */ >> +#define PCI_VENDOR_ID_INTEL 0x8086 >> +#endif >> + > This is broken, PCI_VENDOR_ID_INTEL should be defined in a central location for > all pci drivers, not redefined in every compilation unit. And you can likely Well we can keep the vendors in a common header, but I don't see the benefit. > just remvoe the RTE_PCI_DEV_ID_DECL_* macros from each patch and use the > RTE_PCI_DEV macro, as all the DECL macros just evaluate to that anyway. app/test/test_pci.c:#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)}, lib/librte_eal/linuxapp/kni/kni_misc.c: #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev): All this stuff is because of pci tests and kni code. >> > >> + >> +#undef RTE_PCI_DEV_ID_DECL_EM > Why are you undefining this here? Is it because its in a header file and you're > concerned about multiple inclusion? You should use an ifdef guard instead, or > just define all the device id's in the header and ennumerate the pci table in > one of the C files for the driver. That should apply to all the patches in this > series I think Just moved the code. -- David Marchand