* [dpdk-dev] [PATCH v3 0/1] vmxnet3 hotplug support
[not found] <PATCH v3>
@ 2015-10-27 17:12 ` Bernard Iremonger
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 0/1] vhost_xen: fix compile error Bernard Iremonger
1 sibling, 1 reply; 6+ messages in thread
From: Bernard Iremonger @ 2015-10-27 17:12 UTC (permalink / raw)
To: dev
add PCI Port Hotplug support to the vmxnet3 PMD
This patch depends on v5 of the following patch set:
remove-pci-driver-from-vdevs.patch
Changes in v3:
Rebase.
Changes in v2:
Update release notes.
Bernard Iremonger (1):
vmxnet3: add PCI Port Hotplug support
doc/guides/rel_notes/release_2_2.rst | 2 ++
drivers/net/vmxnet3/vmxnet3_ethdev.c | 33 +++++++++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 0/1] vmxnet3 hotplug support Bernard Iremonger
@ 2015-10-27 17:12 ` Bernard Iremonger
2015-11-03 18:28 ` Thomas Monjalon
0 siblings, 1 reply; 6+ messages in thread
From: Bernard Iremonger @ 2015-10-27 17:12 UTC (permalink / raw)
To: dev
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
doc/guides/rel_notes/release_2_2.rst | 2 ++
drivers/net/vmxnet3/vmxnet3_ethdev.c | 33 +++++++++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 455b5a2..a26c5b8 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -13,6 +13,8 @@ New Features
* This change required modifications to librte_ether and all vdev and pdev PMD's.
+* **Added port hotplug support to the vmxnet3 PMD.**
+
Resolved Issues
---------------
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2beee3e..5cd708e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -70,6 +70,7 @@
#define PROCESS_SYS_EVENTS 0
static int eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev);
+static int eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev);
static int vmxnet3_dev_configure(struct rte_eth_dev *dev);
static int vmxnet3_dev_start(struct rte_eth_dev *dev);
static void vmxnet3_dev_stop(struct rte_eth_dev *dev);
@@ -296,13 +297,37 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
return 0;
}
+static int
+eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev)
+{
+ struct vmxnet3_hw *hw = eth_dev->data->dev_private;
+
+ PMD_INIT_FUNC_TRACE();
+
+ if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+ return 0;
+
+ if (hw->adapter_stopped == 0)
+ vmxnet3_dev_close(eth_dev);
+
+ eth_dev->dev_ops = NULL;
+ eth_dev->rx_pkt_burst = NULL;
+ eth_dev->tx_pkt_burst = NULL;
+
+ rte_free(eth_dev->data->mac_addrs);
+ eth_dev->data->mac_addrs = NULL;
+
+ return 0;
+}
+
static struct eth_driver rte_vmxnet3_pmd = {
.pci_drv = {
.name = "rte_vmxnet3_pmd",
.id_table = pci_id_vmxnet3_map,
- .drv_flags = RTE_PCI_DRV_NEED_MAPPING,
+ .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE,
},
.eth_dev_init = eth_vmxnet3_dev_init,
+ .eth_dev_uninit = eth_vmxnet3_dev_uninit,
.dev_private_size = sizeof(struct vmxnet3_hw),
};
@@ -581,7 +606,7 @@ vmxnet3_dev_stop(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
- if (hw->adapter_stopped == TRUE) {
+ if (hw->adapter_stopped == 1) {
PMD_INIT_LOG(DEBUG, "Device already closed.");
return;
}
@@ -597,7 +622,7 @@ vmxnet3_dev_stop(struct rte_eth_dev *dev)
/* reset the device */
VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_RESET_DEV);
PMD_INIT_LOG(DEBUG, "Device reset.");
- hw->adapter_stopped = FALSE;
+ hw->adapter_stopped = 0;
vmxnet3_dev_clear_queues(dev);
@@ -617,7 +642,7 @@ vmxnet3_dev_close(struct rte_eth_dev *dev)
PMD_INIT_FUNC_TRACE();
vmxnet3_dev_stop(dev);
- hw->adapter_stopped = TRUE;
+ hw->adapter_stopped = 1;
}
static void
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v3 0/1] vhost_xen: fix compile error
[not found] <PATCH v3>
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 0/1] vmxnet3 hotplug support Bernard Iremonger
@ 2015-11-01 15:58 ` Bernard Iremonger
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c Bernard Iremonger
1 sibling, 1 reply; 6+ messages in thread
From: Bernard Iremonger @ 2015-11-01 15:58 UTC (permalink / raw)
To: dev
changes in v3:
rebase.
add error details to patch description
changes in v2:
update release notes
Bernard Iremonger (1):
vhost_xen: fix compile error in main.c
doc/guides/rel_notes/release_2_2.rst | 3 +++
examples/vhost_xen/main.c | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 0/1] vhost_xen: fix compile error Bernard Iremonger
@ 2015-11-01 15:58 ` Bernard Iremonger
2015-12-07 1:54 ` Thomas Monjalon
0 siblings, 1 reply; 6+ messages in thread
From: Bernard Iremonger @ 2015-11-01 15:58 UTC (permalink / raw)
To: dev
/examples/vhost_xen/main.c:659:61: error: âas no member named â ata, rte_pktmbuf_data_len(buff));
rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
make[1]: *** [main.o] Error 1 ^
make[1]: *** [main.o] Error 1
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
doc/guides/rel_notes/release_2_2.rst | 3 +++
examples/vhost_xen/main.c | 8 +++++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 89e4d58..3745ea2 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -92,6 +92,9 @@ Libraries
Examples
~~~~~~~~
+* **vhost_xen: Fixed compile error.**
+
+ Fixed compile error in examples/vhost_xen/main.c
Other
~~~~~
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
index 5d20700..d124be1 100644
--- a/examples/vhost_xen/main.c
+++ b/examples/vhost_xen/main.c
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -579,6 +579,7 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)
uint16_t res_base_idx, res_end_idx;
uint16_t free_entries;
uint8_t success = 0;
+ void *userdata;
LOG_DEBUG(VHOST_DATA, "(%"PRIu64") virtio_dev_rx()\n", dev->device_fh);
vq = dev->virtqueue_rx;
@@ -656,13 +657,14 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)
vq->used->ring[res_cur_idx & (vq->size - 1)].len = packet_len;
/* Copy mbuf data to buffer */
- rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
+ userdata = rte_pktmbuf_mtod(buff, void *);
+ rte_memcpy((void *)(uintptr_t)buff_addr, userdata, rte_pktmbuf_data_len(buff));
res_cur_idx++;
packet_success++;
/* mergeable is disabled then a header is required per buffer. */
- rte_memcpy((void *)(uintptr_t)buff_hdr_addr, (const void*)&virtio_hdr, vq->vhost_hlen);
+ rte_memcpy((void *)(uintptr_t)buff_hdr_addr, (const void *)&virtio_hdr, vq->vhost_hlen);
if (res_cur_idx < res_end_idx) {
/* Prefetch descriptor index. */
rte_prefetch0(&vq->desc[head[packet_success]]);
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
@ 2015-11-03 18:28 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2015-11-03 18:28 UTC (permalink / raw)
To: Bernard Iremonger; +Cc: dev
2015-10-27 17:12, Bernard Iremonger:
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c Bernard Iremonger
@ 2015-12-07 1:54 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2015-12-07 1:54 UTC (permalink / raw)
To: Bernard Iremonger; +Cc: dev
2015-11-01 15:58, Bernard Iremonger:
> /examples/vhost_xen/main.c:659:61: error: âas no member named â ata, rte_pktmbuf_data_len(buff));
> rte_memcpy((void *)(uintptr_t)buff_addr, (const void*)buff->data, rte_pktmbuf_data_len(buff));
> make[1]: *** [main.o] Error 1 ^
> make[1]: *** [main.o] Error 1
>
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
> Acked-by: Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Commit message cleaned and applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-07 1:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <PATCH v3>
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 0/1] vmxnet3 hotplug support Bernard Iremonger
2015-10-27 17:12 ` [dpdk-dev] [PATCH v3 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
2015-11-03 18:28 ` Thomas Monjalon
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 0/1] vhost_xen: fix compile error Bernard Iremonger
2015-11-01 15:58 ` [dpdk-dev] [PATCH v3 1/1] vhost_xen: fix compile error in main.c Bernard Iremonger
2015-12-07 1:54 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).