From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, alexmay@microsoft.com
Subject: Re: [PATCH v4 3/7] hv: add basic vmbus support
Date: Thu, 09 Jul 2015 01:51:34 +0200 [thread overview]
Message-ID: <2920494.EFcdHfRdpu@xps13> (raw)
In-Reply-To: <1429637564-5656-4-git-send-email-stephen@networkplumber.org>
2015-04-21 10:32, Stephen Hemminger:
> The hyper-v device driver forces the base EAL code to change
> to support multiple bus types. This is done changing the pci_device
> in ether driver to a generic union.
>
> As much as possible this is done in a backwards source compatiable
> way. It will break ABI for device drivers.
> --- a/lib/librte_eal/common/eal_common_options.c
> +++ b/lib/librte_eal/common/eal_common_options.c
> @@ -80,6 +80,7 @@ eal_long_options[] = {
> {OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM },
> {OPT_NO_HUGE, 0, NULL, OPT_NO_HUGE_NUM },
> {OPT_NO_PCI, 0, NULL, OPT_NO_PCI_NUM },
> + {OPT_NO_VMBUS, 0, NULL, OPT_NO_VMBUS_NUM },
Alignment, please.
> @@ -66,6 +66,7 @@ struct internal_config {
> volatile unsigned no_hugetlbfs; /**< true to disable hugetlbfs */
> volatile unsigned xen_dom0_support; /**< support app running on Xen Dom0*/
> volatile unsigned no_pci; /**< true to disable PCI */
> + volatile unsigned no_vmbus; /**< true to disable VMBUS */
> volatile unsigned no_hpet; /**< true to disable HPET */
> volatile unsigned vmware_tsc_map; /**< true to use VMware TSC mapping
Alignment may be better.
> +#ifdef RTE_LIBRTE_HV_PMD
> + case RTE_BUS_VMBUS:
> + eth_drv->vmbus_drv.devinit = rte_vmbus_dev_init;
> + eth_drv->vmbus_drv.devuninit = rte_vmbus_dev_uninit;
> + rte_eal_vmbus_register(ð_drv->vmbus_drv);
> + break;
> +#endif
Why ifdef'ing this code?
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -1477,7 +1478,10 @@ struct rte_eth_dev {
> struct rte_eth_dev_data *data; /**< Pointer to device data */
> const struct eth_driver *driver;/**< Driver for this device */
> const struct eth_dev_ops *dev_ops; /**< Functions exported by PMD */
> - struct rte_pci_device *pci_dev; /**< PCI info. supplied by probing */
> + union {
> + struct rte_pci_device *pci_dev; /**< PCI info. supplied by probig */
> + struct rte_vmbus_device *vmbus_dev; /**< VMBUS info. supplied by probing */
> + };
[...]
> struct eth_driver {
> - struct rte_pci_driver pci_drv; /**< The PMD is also a PCI driver. */
> + union {
> + struct rte_pci_driver pci_drv; /**< The PMD is also a PCI driver. */
> + struct rte_vmbus_driver vmbus_drv;/**< The PMD is also a VMBUS drv. */
> + };
> + enum {
> + RTE_BUS_PCI=0,
> + RTE_BUS_VMBUS
> + } bus_type; /**< Device bus type. */
A device may also be virtual.
next prev parent reply other threads:[~2015-07-08 23:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 17:32 [PATCH v4 0/7] Hyper-V Poll Mode driver Stephen Hemminger
[not found] ` <1429637564-5656-1-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
2015-04-21 17:32 ` [PATCH v4 1/7] ether: add function to query for link state interrupt Stephen Hemminger
2015-07-08 23:42 ` Thomas Monjalon
[not found] ` <d0360434d10a44dcb9f5c9c7220c3162@HQ1WP-EXMB11.corp.brocade.com>
2017-02-08 23:25 ` Stephen Hemminger
2015-04-21 17:32 ` [PATCH v4 2/7] pmd: change drivers initialization for pci Stephen Hemminger
2015-04-21 17:32 ` [PATCH v4 3/7] hv: add basic vmbus support Stephen Hemminger
2015-07-08 23:51 ` Thomas Monjalon [this message]
2015-04-21 17:32 ` [PATCH v4 4/7] hv: uio driver Stephen Hemminger
2015-07-08 23:55 ` Thomas Monjalon
2015-04-21 17:32 ` [PATCH v4 5/7] hv: poll mode driver Stephen Hemminger
[not found] ` <1429637564-5656-6-git-send-email-stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
2015-04-21 19:34 ` Butler, Siobhan A
[not found] ` <0C5AFCA4B3408848ADF2A3073F7D8CC86D5A6905-kPTMFJFq+rHjxeytcECX8bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-04-21 21:35 ` Stephen Hemminger
2015-07-09 0:01 ` Thomas Monjalon
2015-07-09 0:05 ` Thomas Monjalon
2015-04-21 17:32 ` [PATCH v4 6/7] hv: enable driver in common config Stephen Hemminger
2015-07-08 23:58 ` Thomas Monjalon
2015-04-21 17:32 ` [PATCH v4 7/7] hv: add kernel patch Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2920494.EFcdHfRdpu@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=alexmay@microsoft.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.