From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by dpdk.org (Postfix) with ESMTP id 9B2B3F931 for ; Tue, 20 Dec 2016 16:39:02 +0100 (CET) Received: by mail-pg0-f46.google.com with SMTP id f188so74169220pgc.3 for ; Tue, 20 Dec 2016 07:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vu2ifLabVhhglZMcTq/w2J/O+LmtW1M4+fiTDBbDci8=; b=Mt3WWg7G3URMJqCOENAc1IaJxE1jatdZTigtJRqhK+iI2ouRKkFRzzOJtu3Yq190Kq 5ugKOIpZUa5007gwQjrpSxj5l0OvzpktM0VXJBKANUNMUZi3tSK2SCWc3ROMQ1ZYXPiP 3EcmLDu6Onq0uBKLWtlLxwcvZQDag9nzJdPUuU7Bq6qPC2NZ8joq8lynUxY01xtde4tq BcdxSs3LGl6niT3anHrADBjX2V6BlsjnuprBO5bLPVCPQrF2O+9x/deN76EiM5edbfpv HZGBF8zQUWhe/G99kzqhSsrN2ZCB2c4djXhBL9C2tMBcm1m1ntYLX9FeXKKBjAZGbndJ zt5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vu2ifLabVhhglZMcTq/w2J/O+LmtW1M4+fiTDBbDci8=; b=H/vYQ9uWDsqQ+K1spdgpJDhe/0Qy/ODn4WwbYAwH79yh9UTFaLr9hTBSF6Cw03r/1L puIaqasOGRmZe65arf5nPXpISmE6VlJt1XZnKagUdB5aQKywvBk0/TAi9ba4NoEpZDNP fYC8k+shnc6XJyA0W29rwYCZZZy6hSFwcRKQAaU80z/ALJfuNNQcgD65XtgTZhTSIHDZ gLVBkcX7OKrH1CjlgCAfMkrKZni2Snjk7MEEZYA7UJgl6fWBzT3hZjTi/KJFvc/q/MXl 1luSc6jC03b8FOZDs4bw0h3YXPpisNZSEaEGEQYJgy4fTL16/640ykv17HZ9jNZwaLtB ZwXQ== X-Gm-Message-State: AKaTC03CpQMAvC2IyEigSTYO5Ybp0HN3RpeEE+Q/A5WLzoutEO7wpv8KeOLgHBPm1GJ1vA== X-Received: by 10.99.196.70 with SMTP id m6mr37534433pgg.118.1482248341869; Tue, 20 Dec 2016 07:39:01 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id f132sm40082511pfa.72.2016.12.20.07.39.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2016 07:39:01 -0800 (PST) Date: Tue, 20 Dec 2016 07:38:59 -0800 From: Stephen Hemminger To: Jan Blunck Cc: dev@dpdk.org, shreyansh.jain@nxp.com, david.marchand@6wind.com Message-ID: <20161220073859.6bf7c9a3@xeon-e3> In-Reply-To: <1482232315-21626-3-git-send-email-jblunck@infradead.org> References: <1482232315-21626-1-git-send-email-jblunck@infradead.org> <1482232315-21626-3-git-send-email-jblunck@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 2/9] ethdev: Helper to convert to struct rte_pci_device 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: Tue, 20 Dec 2016 15:39:02 -0000 On Tue, 20 Dec 2016 12:11:48 +0100 Jan Blunck wrote: > Signed-off-by: Jan Blunck > Acked-by: Shreyansh Jain > --- > lib/librte_ether/rte_ethdev.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 9678179..3adbb2b 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h > @@ -1644,6 +1644,12 @@ struct rte_eth_dev { > uint8_t attached; /**< Flag indicating the port is attached */ > } __rte_cache_aligned; > > +/** > + * @internal > + * Helper for drivers that need to convert from rte_eth_dev to rte_pci_device. > + */ > +#define ETH_DEV_PCI_DEV(ptr) ((ptr)->pci_dev) > + > struct rte_eth_dev_sriov { > uint8_t active; /**< SRIOV is active with 16, 32 or 64 pools */ > uint8_t nb_q_per_pool; /**< rx queue number per pool */ An inline might be better than macro, since a function is typed versus a macro.