All of lore.kernel.org
 help / color / mirror / Atom feed
  • * [PATCH] doc: add bsd license to svg file
           [not found] <PATCH>
           [not found] ` <1224786829-32405-1-git-send-email-spulijala@amcc.com>
    @ 2014-12-08 17:18 ` Bernard Iremonger
           [not found]   ` <1418059123-32145-1-git-send-email-bernard.iremonger-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
      2015-06-10 15:12 ` [PATCH 0/2] doc: kni command line fixes Bernard Iremonger
                       ` (40 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2014-12-08 17:18 UTC (permalink / raw)
      To: dev-VfR2kkLFssw
    
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
    ---
     .../sample_app_ug/img/exception_path_example.svg   |   36 ++++++++++++++++++++
     1 files changed, 36 insertions(+), 0 deletions(-)
    
    diff --git a/doc/guides/sample_app_ug/img/exception_path_example.svg b/doc/guides/sample_app_ug/img/exception_path_example.svg
    index 5b12974..e72f7ba 100644
    --- a/doc/guides/sample_app_ug/img/exception_path_example.svg
    +++ b/doc/guides/sample_app_ug/img/exception_path_example.svg
    @@ -1,4 +1,40 @@
     <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    +
    +<!--
    +# BSD LICENSE
    +# Copyright (c) <2014>, Intel Corporation
    +# All rights reserved.
    +#
    +# Redistribution and use in source and binary forms, with or without
    +# modification, are permitted provided that the following conditions
    +# are met:
    +#
    +# - Redistributions of source code must retain the above copyright
    +#   notice, this list of conditions and the following disclaimer.
    +#
    +# - Redistributions in binary form must reproduce the above copyright
    +#   notice, this list of conditions and the following disclaimer in
    +#   the documentation and/or other materials provided with the
    +#   distribution.
    +#
    +# - Neither the name of Intel Corporation nor the names of its
    +#   contributors may be used to endorse or promote products derived
    +#   from this software without specific prior written permission.
    +#
    +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
    +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
    +# OF THE POSSIBILITY OF SUCH DAMAGE.
    +-->
    +
     <svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="330.16" width="568.88" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
      <g transform="matrix(0.136 0 0 .13439 -6.7377 -69.183)">
       <path d="m3004.4 514.8v2456.8h1228v-2456.8h-1228z" fill-rule="evenodd" fill="#fcd5b5"/>
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH 0/2]  doc: kni command line fixes
           [not found] <PATCH>
           [not found] ` <1224786829-32405-1-git-send-email-spulijala@amcc.com>
      2014-12-08 17:18 ` [PATCH] doc: add bsd license to svg file Bernard Iremonger
    @ 2015-06-10 15:12 ` Bernard Iremonger
      2015-06-10 15:12   ` [PATCH 1/2] doc: correct kni command line in virtio chapter Bernard Iremonger
                         ` (2 more replies)
      2015-06-11 14:33 ` [PATCH] doc: update port attach and detach in Testpmd Runtime Functions chapter Bernard Iremonger
                       ` (39 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-10 15:12 UTC (permalink / raw)
      To: dev
    
    Several kni command lines did not work.
    The patches below fix the command lines.
    
    Bernard Iremonger (2):
      doc: correct kni command line in virtio chapter
      doc: fix kni command line in Kernel NIC Interface chapter
    
     doc/guides/nics/virtio.rst                     |    4 ++--
     doc/guides/prog_guide/kernel_nic_interface.rst |    4 ++--
     2 files changed, 4 insertions(+), 4 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH] doc: update port attach and detach in Testpmd Runtime Functions chapter
           [not found] <PATCH>
                       ` (2 preceding siblings ...)
      2015-06-10 15:12 ` [PATCH 0/2] doc: kni command line fixes Bernard Iremonger
    @ 2015-06-11 14:33 ` Bernard Iremonger
      2015-06-16  2:45   ` Tetsuya Mukawa
      2015-06-12 16:21 ` [PATCH v3 0/2] bonding PCI Port Hotplug Bernard Iremonger
                       ` (38 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-11 14:33 UTC (permalink / raw)
      To: dev
    
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     doc/guides/testpmd_app_ug/testpmd_funcs.rst |   96 +++++++++++++++++++++++----
     1 files changed, 82 insertions(+), 14 deletions(-)
    
    diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
    index 761172e..fef3ceb 100644
    --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
    +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
    @@ -1,5 +1,5 @@
     ..  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
    @@ -866,31 +866,61 @@ Attach a port specified by pci address or virtual device args.
     To attach a new pci device, the device should be recognized by kernel first.
     Then it should be moved under DPDK management.
     Finally the port can be attached to testpmd.
    -On the other hand, to attach a port created by virtual device, above steps are not needed.
    +
    +For example, to move a pci device using ixgbe under DPDK management:
    +
    +.. code-block:: console
    +
    +    ./tools/dpdk_nic_bind.py --status
    +
    +    Network devices using DPDK-compatible driver
    +    ============================================
    +    <none>
    +
    +    Network devices using kernel driver
    +    ===================================
    +    0000:0a:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=eth2 drv=ixgbe unused=
    +
    +    ./tools/dpdk_nic_bind.py -b igb_uio 0000:0a:00.0
    +    ./tools/dpdk_nic_bind.py --status
    +
    +    Network devices using DPDK-compatible driver
    +    ============================================
    +    0000:0a:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused=
    +
    +To attach a port created by virtual device, above steps are not needed.
     
     port attach (identifier)
     
    -For example, to attach a port whose pci address is 0000:02:00.0.
    +For example, to attach a port whose pci address is 0000:0a:00.0.
     
     .. code-block:: console
     
    -    testpmd> port attach 0000:02:00.0
    +    testpmd> port attach 0000:0a:00.0
         Attaching a new port...
    -    ... snip ...
    +    EAL: PCI device 0000:0a:00.0 on NUMA socket -1
    +    EAL:   probe driver: 8086:10fb rte_ixgbe_pmd
    +    EAL:   PCI memory mapped at 0x7f83bfa00000
    +    EAL:   PCI memory mapped at 0x7f83bfa80000
    +    PMD: eth_ixgbe_dev_init(): MAC: 2, PHY: 18, SFP+: 5
    +    PMD: eth_ixgbe_dev_init(): port 0 vendorID=0x8086 deviceID=0x10fb
         Port 0 is attached. Now total ports is 1
         Done
    +    testpmd>
     
     For example, to attach a port created by pcap PMD.
     
     .. code-block:: console
     
    -    testpmd> port attach eth_pcap0,iface=eth0
    +    testpmd> port attach eth_pcap0
         Attaching a new port...
    -    ... snip ...
    +    PMD: Initializing pmd_pcap for eth_pcap0
    +    PMD: Creating pcap-backed ethdev on numa socket 0
         Port 0 is attached. Now total ports is 1
         Done
    +    testpmd>
     
    -In this case, identifier is "eth_pcap0,iface=eth0".
    +In this case, identifier is "eth_pcap0".
     This identifier format is the same as "--vdev" format of DPDK applications.
     
     port detach
    @@ -899,21 +929,59 @@ port detach
     Detach a specific port.
     
     Before detaching a port, the port should be closed.
    -Also to remove a pci device completely from the system, first detach the port from testpmd.
    -Then the device should be moved under kernel management.
    -Finally the device can be removed using kernel pci hotplug functionality.
    -On the other hand, to remove a port created by a virtual device, above steps are not needed.
     
     port detach (port_id)
     
    -For example, to detach a port 0.
    +For example, to detach a pci device port 0.
    +
    +.. code-block:: console
    +
    +    testpmd> port close 0
    +    Closing ports...
    +    Done
    +    testpmd> port detach 0
    +    Detaching a port...
    +    EAL: PCI device 0000:0a:00.0 on NUMA socket -1
    +    EAL:   remove driver: 8086:10fb rte_ixgbe_pmd
    +    EAL:   PCI memory unmapped at 0x7f83bfa00000
    +    EAL:   PCI memory unmapped at 0x7f83bfa80000
    +    Done
    +    testpmd>
    +
    +For example, to detach a virtual device port 0.
     
     .. code-block:: console
     
    +    testpmd> port close 0
    +    Closing ports...
    +    Done
         testpmd> port detach 0
         Detaching a port...
    -    ... snip ...
    +    PMD: Closing pcap ethdev on numa socket 0
    +    Port 'eth_pcap0' is detached. Now total ports is 0
         Done
    +    testpmd>
    +
    +To remove a pci device completely from the system, first detach the port from testpmd.
    +Then the device should be moved under kernel management.
    +Finally the device can be removed using kernel pci hotplug functionality.
    +
    +For example, to move a pci device under kernel management:
    +
    +.. code-block:: console
    +
    +    ./tools/dpdk_nic_bind.py -b ixgbe 0000:0a:00.0
    +    ./tools/dpdk_nic_bind.py --status
    +
    +    Network devices using DPDK-compatible driver
    +    ============================================
    +    <none>
    +
    +    Network devices using kernel driver
    +    ===================================
    +    0000:0a:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=eth2 drv=ixgbe unused=igb_uio
    +
    +To remove a port created by a virtual device, above steps are not needed.
     
     port start
     ~~~~~~~~~~
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v3 0/2] bonding PCI Port Hotplug
           [not found] <PATCH>
                       ` (3 preceding siblings ...)
      2015-06-11 14:33 ` [PATCH] doc: update port attach and detach in Testpmd Runtime Functions chapter Bernard Iremonger
    @ 2015-06-12 16:21 ` Bernard Iremonger
      2015-06-12 16:21   ` [PATCH v3 1/2] bonding: add support for " Bernard Iremonger
                         ` (2 more replies)
      2015-06-16 11:30 ` [PATCH v2 0/2] virtio: " Bernard Iremonger
                       ` (37 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-12 16:21 UTC (permalink / raw)
      To: dev
    
    Changes in V3:
    Modified testpmd to handle attach/detach of bonding pmd.
    
    Bernard Iremonger (2):
      bonding: add support for PCI Port Hotplug
      test-pmd: modified testpmd for link_bonding
    
     app/test-pmd/cmdline.c                     |    4 +-
     app/test-pmd/testpmd.c                     |   24 +++++++-
     app/test-pmd/testpmd.h                     |    7 ++-
     drivers/net/bonding/rte_eth_bond.h         |   13 ++++-
     drivers/net/bonding/rte_eth_bond_api.c     |   82 +++++++++++++++++++---------
     drivers/net/bonding/rte_eth_bond_pmd.c     |   23 +++++++-
     drivers/net/bonding/rte_eth_bond_private.h |    7 ++-
     7 files changed, 124 insertions(+), 36 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v2 0/2] virtio: PCI Port Hotplug
           [not found] <PATCH>
                       ` (4 preceding siblings ...)
      2015-06-12 16:21 ` [PATCH v3 0/2] bonding PCI Port Hotplug Bernard Iremonger
    @ 2015-06-16 11:30 ` Bernard Iremonger
      2015-06-16 11:30   ` [PATCH v3 1/2] virtio: add support for " Bernard Iremonger
      2015-06-16 11:30   ` [PATCH v3 2/2] virtio: check vq parameter Bernard Iremonger
      2015-06-17 11:38 ` [PATCH v4 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
                       ` (36 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-16 11:30 UTC (permalink / raw)
      To: dev
    
    This patchset contains changes to add support for
    PCI port hotplug.
    It  also contains a fix to virtqueuq_detach_unused().
    
    Bernard Iremonger (2):
      virtio: add support for PCI Port Hotplug
      virtio: check vq parameter
    
     drivers/net/virtio/virtio_ethdev.c |   83 +++++++++++++++++++++++++++++++++---
     drivers/net/virtio/virtqueue.c     |   14 +++---
     2 files changed, 84 insertions(+), 13 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v4 0/6] i40e: PCI Port Hotplug Changes
           [not found] <PATCH>
                       ` (5 preceding siblings ...)
      2015-06-16 11:30 ` [PATCH v2 0/2] virtio: " Bernard Iremonger
    @ 2015-06-17 11:38 ` Bernard Iremonger
      2015-06-17 11:38   ` [PATCH v4 1/6] i40e: changes to support PCI Port Hotplug Bernard Iremonger
                         ` (2 more replies)
      2015-06-17 11:39 ` [PATCH v4 4/6] i40e: call _clear_cmd() when error occurs Bernard Iremonger
                       ` (35 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-17 11:38 UTC (permalink / raw)
      To: dev
    
    Changes in V4:
    added patch 6 to fix segmentation fault reported by Michael Qiu.
    
    Bernard Iremonger (6):
      i40e: changes to support PCI Port Hotplug
      i40e: release vmdq vsi's in dev_close
      i40e: increase ASQ_DELAY_MS to 100 in i40evf_wait_cmd_done()
      i40e: call _clear_cmd() when error occurs
      i40e: clear queues in i40evf_dev_stop
      i40e: check rxq parameter in i40e_reset_rx_queue
    
     drivers/net/i40e/i40e_ethdev.c    |   88 ++++++++++++++++++++++++++++++++++++-
     drivers/net/i40e/i40e_ethdev_vf.c |   71 +++++++++++++++++++++++++++---
     drivers/net/i40e/i40e_pf.c        |   34 ++++++++++++++
     drivers/net/i40e/i40e_pf.h        |    1 +
     drivers/net/i40e/i40e_rxtx.c      |    5 ++
     5 files changed, 192 insertions(+), 7 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v4 4/6] i40e: call _clear_cmd() when error occurs
           [not found] <PATCH>
                       ` (6 preceding siblings ...)
      2015-06-17 11:38 ` [PATCH v4 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
    @ 2015-06-17 11:39 ` Bernard Iremonger
      2015-06-17 11:39   ` [PATCH v4 5/6] i40e: clear queues in i40evf_dev_stop Bernard Iremonger
      2015-06-17 11:39   ` [PATCH v4 6/6] i40e: check rxq parameter in i40e_reset_rx_queue Bernard Iremonger
      2015-06-18 12:44 ` [PATCH v5] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
                       ` (34 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-17 11:39 UTC (permalink / raw)
      To: dev
    
    _clear_cmd() was not being called in failure situations,
    resulting in the next command also failing.
    Fix several typos.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/i40e/i40e_ethdev_vf.c |   11 +++++++----
     1 files changed, 7 insertions(+), 4 deletions(-)
    
    diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
    index 7a6480a..1b9362f 100644
    --- a/drivers/net/i40e/i40e_ethdev_vf.c
    +++ b/drivers/net/i40e/i40e_ethdev_vf.c
    @@ -361,6 +361,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
     		     args->in_args, args->in_args_size, NULL);
     	if (err) {
     		PMD_DRV_LOG(ERR, "fail to send cmd %d", args->ops);
    +		_clear_cmd(vf);
     		return err;
     	}
     
    @@ -368,8 +369,10 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
     	/* read message and it's expected one */
     	if (!err && args->ops == info.ops)
     		_clear_cmd(vf);
    -	else if (err)
    +	else if (err) {
     		PMD_DRV_LOG(ERR, "Failed to read message from AdminQ");
    +		_clear_cmd(vf);
    +	}
     	else if (args->ops != info.ops)
     		PMD_DRV_LOG(ERR, "command mismatch, expect %u, get %u",
     			    args->ops, info.ops);
    @@ -794,7 +797,7 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
     	/* Stop TX queues first */
     	for (i = 0; i < dev->data->nb_tx_queues; i++) {
     		if (i40evf_dev_tx_queue_stop(dev, i) != 0) {
    -			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
    +			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
     			return -1;
     		}
     	}
    @@ -802,7 +805,7 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
     	/* Then stop RX queues */
     	for (i = 0; i < dev->data->nb_rx_queues; i++) {
     		if (i40evf_dev_rx_queue_stop(dev, i) != 0) {
    -			PMD_DRV_LOG(ERR, "Fail to start queue %u", i);
    +			PMD_DRV_LOG(ERR, "Fail to stop queue %u", i);
     			return -1;
     		}
     	}
    @@ -1443,7 +1446,7 @@ i40evf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
     		err = i40evf_switch_queue(dev, FALSE, tx_queue_id, FALSE);
     
     		if (err) {
    -			PMD_DRV_LOG(ERR, "Failed to switch TX queue %u of",
    +			PMD_DRV_LOG(ERR, "Failed to switch TX queue %u off",
     				    tx_queue_id);
     			return err;
     		}
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v5] e1000: igb and em1000 PCI Port Hotplug changes
           [not found] <PATCH>
                       ` (7 preceding siblings ...)
      2015-06-17 11:39 ` [PATCH v4 4/6] i40e: call _clear_cmd() when error occurs Bernard Iremonger
    @ 2015-06-18 12:44 ` Bernard Iremonger
      2015-06-19 17:03 ` [PATCH v5 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
                       ` (33 subsequent siblings)
      42 siblings, 0 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-18 12:44 UTC (permalink / raw)
      To: dev
    
    This patch depends on the Port Hotplug Framework.
    It implements the eth_dev_uninit functions for rte_em_pmd,
    rte_igb_pmd and rte_igbvf_pmd.
    
    Changes in V5:
    Moved adapter stopped boolean to struct e1000_adapter.
    Rebase to latest code.
    
    Changes in V4:
    Release rx and tx queues in eth_igbvf_dev_uninit.
    
    Changes in V3:
    Add igb_adapter_stopped and em_adapter_stopped booleans.
    Release rx and tx queues in eth_igb_dev_uninit.
    
    Changes in V2:
    Call dev_close() from  dev_uninit() functions.
    Remove input parameter checking from dev_uninit() functions.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/e1000/e1000_ethdev.h |    8 ++-
     drivers/net/e1000/em_ethdev.c    |   57 ++++++++++++++++++-
     drivers/net/e1000/igb_ethdev.c   |  115 +++++++++++++++++++++++++++++++++++++-
     drivers/net/e1000/igb_pf.c       |   22 +++++++
     4 files changed, 197 insertions(+), 5 deletions(-)
    
    diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
    index c451faa..ee8b872 100644
    --- a/drivers/net/e1000/e1000_ethdev.h
    +++ b/drivers/net/e1000/e1000_ethdev.h
    @@ -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
    @@ -229,8 +229,12 @@ struct e1000_adapter {
     	struct e1000_vfta       shadow_vfta;
     	struct e1000_vf_info    *vfdata;
     	struct e1000_filter_info filter;
    +	bool stopped;
     };
     
    +#define E1000_DEV_PRIVATE(adapter) \
    +	((struct e1000_adapter *)adapter)
    +
     #define E1000_DEV_PRIVATE_TO_HW(adapter) \
     	(&((struct e1000_adapter *)adapter)->hw)
     
    @@ -337,4 +341,6 @@ uint16_t eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
     uint16_t eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
     		uint16_t nb_pkts);
     
    +void igb_pf_host_uninit(struct rte_eth_dev *dev);
    +
     #endif /* _E1000_ETHDEV_H_ */
    diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
    index a306c55..0f471c2 100644
    --- a/drivers/net/e1000/em_ethdev.c
    +++ b/drivers/net/e1000/em_ethdev.c
    @@ -224,6 +224,8 @@ static int
     eth_em_dev_init(struct rte_eth_dev *eth_dev)
     {
     	struct rte_pci_device *pci_dev;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	struct e1000_vfta * shadow_vfta =
    @@ -246,6 +248,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
     
     	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
     	hw->device_id = pci_dev->id.device_id;
    +	adapter->stopped = 0;
     
     	/* For ICH8 support we'll need to map the flash memory BAR */
     
    @@ -285,13 +288,58 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
     	return (0);
     }
     
    +static int
    +eth_em_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct rte_pci_device *pci_dev;
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	pci_dev = eth_dev->pci_dev;
    +
    +	if (adapter->stopped == 0)
    +		eth_em_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;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_em_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_em_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +
    +	/* disable uio intr before callback unregister */
    +	rte_intr_disable(&(pci_dev->intr_handle));
    +	rte_intr_callback_unregister(&(pci_dev->intr_handle),
    +		eth_em_interrupt_handler, (void *)eth_dev);
    +
    +	return 0;
    +}
    +
     static struct eth_driver rte_em_pmd = {
     	.pci_drv = {
     		.name = "rte_em_pmd",
     		.id_table = pci_id_em_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
    +			RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_em_dev_init,
    +	.eth_dev_uninit = eth_em_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -451,6 +499,8 @@ em_set_pba(struct e1000_hw *hw)
     static int
     eth_em_start(struct rte_eth_dev *dev)
     {
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
     	int ret, mask;
    @@ -570,6 +620,8 @@ eth_em_start(struct rte_eth_dev *dev)
     		}
     	}
     
    +	adapter->stopped = 0;
    +
     	PMD_INIT_LOG(DEBUG, "<<");
     
     	return (0);
    @@ -613,8 +665,11 @@ static void
     eth_em_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     
     	eth_em_stop(dev);
    +	adapter->stopped = 1;
     	e1000_phy_hw_reset(hw);
     	em_release_manageability(hw);
     	em_hw_control_release(hw);
    diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
    index 24c7510..ffd849d 100644
    --- a/drivers/net/e1000/igb_ethdev.c
    +++ b/drivers/net/e1000/igb_ethdev.c
    @@ -465,9 +465,12 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	struct e1000_vfta * shadow_vfta =
    -			E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
    +		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
     	struct e1000_filter_info *filter_info =
     		E1000_DEV_PRIVATE_TO_FILTER_INFO(eth_dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
     	uint32_t ctrl_ext;
     
     	pci_dev = eth_dev->pci_dev;
    @@ -570,6 +573,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
     		goto err_late;
     	}
     	hw->mac.get_link_status = 1;
    +	adapter->stopped = 0;
     
     	/* Indicate SOL/IDER usage */
     	if (e1000_check_reset_block(hw) < 0) {
    @@ -614,6 +618,57 @@ err_late:
     	return (error);
     }
     
    +static int
    +eth_igb_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct rte_pci_device *pci_dev;
    +	struct e1000_hw *hw;
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	hw = E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
    +	pci_dev = eth_dev->pci_dev;
    +
    +	if (adapter->stopped == 0)
    +		eth_igb_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_igb_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_igb_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +
    +	/* Reset any pending lock */
    +	igb_reset_swfw_lock(hw);
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	/* uninitialize PF if max_vfs not zero */
    +	igb_pf_host_uninit(eth_dev);
    +
    +	/* disable uio intr before callback unregister */
    +	rte_intr_disable(&(pci_dev->intr_handle));
    +	rte_intr_callback_unregister(&(pci_dev->intr_handle),
    +		eth_igb_interrupt_handler, (void *)eth_dev);
    +
    +	return 0;
    +}
    +
     /*
      * Virtual Function device init
      */
    @@ -621,6 +676,8 @@ static int
     eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     {
     	struct rte_pci_device *pci_dev;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	int diag;
    @@ -645,6 +702,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     	hw->device_id = pci_dev->id.device_id;
     	hw->vendor_id = pci_dev->id.vendor_id;
     	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
    +	adapter->stopped = 0;
     
     	/* Initialize the shared code (base driver) */
     	diag = e1000_setup_init_funcs(hw, TRUE);
    @@ -685,13 +743,50 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     	return 0;
     }
     
    +static int
    +eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	if (adapter->stopped == 0)
    +		igbvf_dev_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_igb_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_igb_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	return 0;
    +}
    +
     static struct eth_driver rte_igb_pmd = {
     	.pci_drv = {
     		.name = "rte_igb_pmd",
     		.id_table = pci_id_igb_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
    +			RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_igb_dev_init,
    +	.eth_dev_uninit = eth_igb_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -702,9 +797,10 @@ static struct eth_driver rte_igbvf_pmd = {
     	.pci_drv = {
     		.name = "rte_igbvf_pmd",
     		.id_table = pci_id_igbvf_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_igbvf_dev_init,
    +	.eth_dev_uninit = eth_igbvf_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -758,6 +854,8 @@ eth_igb_start(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	int ret, i, mask;
     	uint32_t ctrl_ext;
     
    @@ -786,6 +884,7 @@ eth_igb_start(struct rte_eth_dev *dev)
     		PMD_INIT_LOG(ERR, "Unable to initialize the hardware");
     		return (-EIO);
     	}
    +	adapter->stopped = 0;
     
     	E1000_WRITE_REG(hw, E1000_VET, ETHER_TYPE_VLAN << 16 | ETHER_TYPE_VLAN);
     
    @@ -992,9 +1091,13 @@ static void
     eth_igb_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	struct rte_eth_link link;
     
     	eth_igb_stop(dev);
    +	adapter->stopped = 1;
    +
     	e1000_phy_hw_reset(hw);
     	igb_release_manageability(hw);
     	igb_hw_control_release(hw);
    @@ -2228,11 +2331,14 @@ igbvf_dev_start(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	int ret;
     
     	PMD_INIT_FUNC_TRACE();
     
     	hw->mac.ops.reset_hw(hw);
    +	adapter->stopped = 0;
     
     	/* Set all vfta */
     	igbvf_set_vfta_all(dev,1);
    @@ -2270,12 +2376,15 @@ static void
     igbvf_dev_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     
     	PMD_INIT_FUNC_TRACE();
     
     	e1000_reset_hw(hw);
     
     	igbvf_dev_stop(dev);
    +	adapter->stopped = 1;
     }
     
     static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on)
    diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
    index 6a4d210..26c2960 100644
    --- a/drivers/net/e1000/igb_pf.c
    +++ b/drivers/net/e1000/igb_pf.c
    @@ -127,6 +127,28 @@ void igb_pf_host_init(struct rte_eth_dev *eth_dev)
     	return;
     }
     
    +void igb_pf_host_uninit(struct rte_eth_dev *dev)
    +{
    +	struct e1000_vf_info **vfinfo;
    +	uint16_t vf_num;
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	vfinfo = E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
    +
    +	RTE_ETH_DEV_SRIOV(dev).active = 0;
    +	RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = 0;
    +	RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx = 0;
    +	RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = 0;
    +
    +	vf_num = dev_num_vf(dev);
    +	if (vf_num == 0)
    +		return;
    +
    +	rte_free(*vfinfo);
    +	*vfinfo = NULL;
    +}
    +
     #define E1000_RAH_POOLSEL_SHIFT    (18)
     int igb_pf_host_configure(struct rte_eth_dev *eth_dev)
     {
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v5 0/6] i40e: PCI Port Hotplug Changes
           [not found] <PATCH>
                       ` (8 preceding siblings ...)
      2015-06-18 12:44 ` [PATCH v5] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
    @ 2015-06-19 17:03 ` Bernard Iremonger
      2015-06-19 17:03   ` [PATCH v5 1/6] i40e: changes to support PCI Port Hotplug Bernard Iremonger
                         ` (6 more replies)
      2015-06-22 10:44 ` [PATCH v6] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
                       ` (32 subsequent siblings)
      42 siblings, 7 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-19 17:03 UTC (permalink / raw)
      To: dev
    
    Changes in V5:
    Increased timeout in i40evf_wait_cmd_done()
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebased to latest i40e code.
    
    Changes in V4:
    added patch 6 to fix segmentation fault reported by Michael Qiu.
    Rebase to latest i40e code.
    
    Changes in V3:
    Release rx and tx queues in vf uninit function.
    Rebase to use latest i40e code.
    
    Changes in V2:
    Rebase to use drivers/net/i40e directory.
    
    Bernard Iremonger (6):
      i40e: changes to support PCI Port Hotplug
      i40e: release vmdq vsi's in dev_close
      i40e: increase ASQ_DELAY_MS to 100 in i40evf_wait_cmd_done()
      i40e: call _clear_cmd() when error occurs
      i40e: clear queues in i40evf_dev_stop
      i40e: check rxq parameter in i40e_reset_rx_queue
    
     drivers/net/i40e/i40e_ethdev.c    |   88 ++++++++++++++++++++++++++++++++++++-
     drivers/net/i40e/i40e_ethdev_vf.c |   71 +++++++++++++++++++++++++++---
     drivers/net/i40e/i40e_pf.c        |   34 ++++++++++++++
     drivers/net/i40e/i40e_pf.h        |    1 +
     drivers/net/i40e/i40e_rxtx.c      |    5 ++
     5 files changed, 192 insertions(+), 7 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v6] e1000: igb and em1000 PCI Port Hotplug changes
           [not found] <PATCH>
                       ` (9 preceding siblings ...)
      2015-06-19 17:03 ` [PATCH v5 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
    @ 2015-06-22 10:44 ` Bernard Iremonger
      2015-06-25  2:33   ` Zhang, Helin
      2015-06-26  8:56   ` Zhang, Helin
      2015-06-24 15:08 ` [PATCH v5] ixgbe: changes to support PCI Port Hotplug Bernard Iremonger
                       ` (31 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-22 10:44 UTC (permalink / raw)
      To: dev
    
    This patch depends on the Port Hotplug Framework.
    It implements the eth_dev_uninit functions for rte_em_pmd,
    rte_igb_pmd and rte_igbvf_pmd.
    
    Changes in v6:
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebase to latest code.
    
    Changes in V5:
    Moved adapter stopped boolean to struct e1000_adapter.
    Rebase to latest code.
    
    Changes in V4:
    Release rx and tx queues in eth_igbvf_dev_uninit.
    
    Changes in V3:
    Add igb_adapter_stopped and em_adapter_stopped booleans.
    Release rx and tx queues in eth_igb_dev_uninit.
    
    Changes in V2:
    Call dev_close() from  dev_uninit() functions.
    Remove input parameter checking from dev_uninit() functions.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/e1000/e1000_ethdev.h |    8 ++-
     drivers/net/e1000/em_ethdev.c    |   59 ++++++++++++++++++-
     drivers/net/e1000/igb_ethdev.c   |  119 +++++++++++++++++++++++++++++++++++++-
     drivers/net/e1000/igb_pf.c       |   22 +++++++
     4 files changed, 203 insertions(+), 5 deletions(-)
    
    diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
    index c451faa..ee8b872 100644
    --- a/drivers/net/e1000/e1000_ethdev.h
    +++ b/drivers/net/e1000/e1000_ethdev.h
    @@ -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
    @@ -229,8 +229,12 @@ struct e1000_adapter {
     	struct e1000_vfta       shadow_vfta;
     	struct e1000_vf_info    *vfdata;
     	struct e1000_filter_info filter;
    +	bool stopped;
     };
     
    +#define E1000_DEV_PRIVATE(adapter) \
    +	((struct e1000_adapter *)adapter)
    +
     #define E1000_DEV_PRIVATE_TO_HW(adapter) \
     	(&((struct e1000_adapter *)adapter)->hw)
     
    @@ -337,4 +341,6 @@ uint16_t eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
     uint16_t eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
     		uint16_t nb_pkts);
     
    +void igb_pf_host_uninit(struct rte_eth_dev *dev);
    +
     #endif /* _E1000_ETHDEV_H_ */
    diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
    index a306c55..b496c39 100644
    --- a/drivers/net/e1000/em_ethdev.c
    +++ b/drivers/net/e1000/em_ethdev.c
    @@ -224,6 +224,8 @@ static int
     eth_em_dev_init(struct rte_eth_dev *eth_dev)
     {
     	struct rte_pci_device *pci_dev;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	struct e1000_vfta * shadow_vfta =
    @@ -246,6 +248,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
     
     	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
     	hw->device_id = pci_dev->id.device_id;
    +	adapter->stopped = 0;
     
     	/* For ICH8 support we'll need to map the flash memory BAR */
     
    @@ -285,13 +288,60 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
     	return (0);
     }
     
    +static int
    +eth_em_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct rte_pci_device *pci_dev;
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	pci_dev = eth_dev->pci_dev;
    +
    +	if (adapter->stopped == 0)
    +		eth_em_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;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_em_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_rx_queues = 0;
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_em_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_tx_queues = 0;
    +
    +	/* disable uio intr before callback unregister */
    +	rte_intr_disable(&(pci_dev->intr_handle));
    +	rte_intr_callback_unregister(&(pci_dev->intr_handle),
    +		eth_em_interrupt_handler, (void *)eth_dev);
    +
    +	return 0;
    +}
    +
     static struct eth_driver rte_em_pmd = {
     	.pci_drv = {
     		.name = "rte_em_pmd",
     		.id_table = pci_id_em_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
    +			RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_em_dev_init,
    +	.eth_dev_uninit = eth_em_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -451,6 +501,8 @@ em_set_pba(struct e1000_hw *hw)
     static int
     eth_em_start(struct rte_eth_dev *dev)
     {
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
     	int ret, mask;
    @@ -570,6 +622,8 @@ eth_em_start(struct rte_eth_dev *dev)
     		}
     	}
     
    +	adapter->stopped = 0;
    +
     	PMD_INIT_LOG(DEBUG, "<<");
     
     	return (0);
    @@ -613,8 +667,11 @@ static void
     eth_em_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     
     	eth_em_stop(dev);
    +	adapter->stopped = 1;
     	e1000_phy_hw_reset(hw);
     	em_release_manageability(hw);
     	em_hw_control_release(hw);
    diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
    index 24c7510..16acdc9 100644
    --- a/drivers/net/e1000/igb_ethdev.c
    +++ b/drivers/net/e1000/igb_ethdev.c
    @@ -465,9 +465,12 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	struct e1000_vfta * shadow_vfta =
    -			E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
    +		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
     	struct e1000_filter_info *filter_info =
     		E1000_DEV_PRIVATE_TO_FILTER_INFO(eth_dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
     	uint32_t ctrl_ext;
     
     	pci_dev = eth_dev->pci_dev;
    @@ -570,6 +573,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
     		goto err_late;
     	}
     	hw->mac.get_link_status = 1;
    +	adapter->stopped = 0;
     
     	/* Indicate SOL/IDER usage */
     	if (e1000_check_reset_block(hw) < 0) {
    @@ -614,6 +618,59 @@ err_late:
     	return (error);
     }
     
    +static int
    +eth_igb_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct rte_pci_device *pci_dev;
    +	struct e1000_hw *hw;
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	hw = E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
    +	pci_dev = eth_dev->pci_dev;
    +
    +	if (adapter->stopped == 0)
    +		eth_igb_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_igb_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_rx_queues = 0;
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_igb_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_tx_queues = 0;
    +
    +	/* Reset any pending lock */
    +	igb_reset_swfw_lock(hw);
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	/* uninitialize PF if max_vfs not zero */
    +	igb_pf_host_uninit(eth_dev);
    +
    +	/* disable uio intr before callback unregister */
    +	rte_intr_disable(&(pci_dev->intr_handle));
    +	rte_intr_callback_unregister(&(pci_dev->intr_handle),
    +		eth_igb_interrupt_handler, (void *)eth_dev);
    +
    +	return 0;
    +}
    +
     /*
      * Virtual Function device init
      */
    @@ -621,6 +678,8 @@ static int
     eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     {
     	struct rte_pci_device *pci_dev;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
     	int diag;
    @@ -645,6 +704,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     	hw->device_id = pci_dev->id.device_id;
     	hw->vendor_id = pci_dev->id.vendor_id;
     	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
    +	adapter->stopped = 0;
     
     	/* Initialize the shared code (base driver) */
     	diag = e1000_setup_init_funcs(hw, TRUE);
    @@ -685,13 +745,52 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
     	return 0;
     }
     
    +static int
    +eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	unsigned i;
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(eth_dev->data->dev_private);
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	if (adapter->stopped == 0)
    +		igbvf_dev_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		eth_igb_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_rx_queues = 0;
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		eth_igb_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_tx_queues = 0;
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	return 0;
    +}
    +
     static struct eth_driver rte_igb_pmd = {
     	.pci_drv = {
     		.name = "rte_igb_pmd",
     		.id_table = pci_id_igb_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
    +			RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_igb_dev_init,
    +	.eth_dev_uninit = eth_igb_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -702,9 +801,10 @@ static struct eth_driver rte_igbvf_pmd = {
     	.pci_drv = {
     		.name = "rte_igbvf_pmd",
     		.id_table = pci_id_igbvf_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_igbvf_dev_init,
    +	.eth_dev_uninit = eth_igbvf_dev_uninit,
     	.dev_private_size = sizeof(struct e1000_adapter),
     };
     
    @@ -758,6 +858,8 @@ eth_igb_start(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	int ret, i, mask;
     	uint32_t ctrl_ext;
     
    @@ -786,6 +888,7 @@ eth_igb_start(struct rte_eth_dev *dev)
     		PMD_INIT_LOG(ERR, "Unable to initialize the hardware");
     		return (-EIO);
     	}
    +	adapter->stopped = 0;
     
     	E1000_WRITE_REG(hw, E1000_VET, ETHER_TYPE_VLAN << 16 | ETHER_TYPE_VLAN);
     
    @@ -992,9 +1095,13 @@ static void
     eth_igb_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	struct rte_eth_link link;
     
     	eth_igb_stop(dev);
    +	adapter->stopped = 1;
    +
     	e1000_phy_hw_reset(hw);
     	igb_release_manageability(hw);
     	igb_hw_control_release(hw);
    @@ -2228,11 +2335,14 @@ igbvf_dev_start(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw =
     		E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     	int ret;
     
     	PMD_INIT_FUNC_TRACE();
     
     	hw->mac.ops.reset_hw(hw);
    +	adapter->stopped = 0;
     
     	/* Set all vfta */
     	igbvf_set_vfta_all(dev,1);
    @@ -2270,12 +2380,15 @@ static void
     igbvf_dev_close(struct rte_eth_dev *dev)
     {
     	struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
    +	struct e1000_adapter *adapter =
    +		E1000_DEV_PRIVATE(dev->data->dev_private);
     
     	PMD_INIT_FUNC_TRACE();
     
     	e1000_reset_hw(hw);
     
     	igbvf_dev_stop(dev);
    +	adapter->stopped = 1;
     }
     
     static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on)
    diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
    index 6a4d210..26c2960 100644
    --- a/drivers/net/e1000/igb_pf.c
    +++ b/drivers/net/e1000/igb_pf.c
    @@ -127,6 +127,28 @@ void igb_pf_host_init(struct rte_eth_dev *eth_dev)
     	return;
     }
     
    +void igb_pf_host_uninit(struct rte_eth_dev *dev)
    +{
    +	struct e1000_vf_info **vfinfo;
    +	uint16_t vf_num;
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	vfinfo = E1000_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
    +
    +	RTE_ETH_DEV_SRIOV(dev).active = 0;
    +	RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = 0;
    +	RTE_ETH_DEV_SRIOV(dev).def_vmdq_idx = 0;
    +	RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = 0;
    +
    +	vf_num = dev_num_vf(dev);
    +	if (vf_num == 0)
    +		return;
    +
    +	rte_free(*vfinfo);
    +	*vfinfo = NULL;
    +}
    +
     #define E1000_RAH_POOLSEL_SHIFT    (18)
     int igb_pf_host_configure(struct rte_eth_dev *eth_dev)
     {
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v5] ixgbe: changes to support PCI Port Hotplug
           [not found] <PATCH>
                       ` (10 preceding siblings ...)
      2015-06-22 10:44 ` [PATCH v6] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
    @ 2015-06-24 15:08 ` Bernard Iremonger
      2015-06-25 11:41   ` Ananyev, Konstantin
      2015-06-25 14:30 ` [PATCH] librte_ether: release memory in uninit function Bernard Iremonger
                       ` (30 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-24 15:08 UTC (permalink / raw)
      To: dev
    
    This patch depends on the Port Hotplug Framework.
    It implements the eth_dev_uninit functions for rte_ixgbe_pmd and
    rte_ixgbevf_pmd.
    
    Changes in V5:
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebased to latest ixgbe code.
    
    Changes in V4:
    Release rx and tx queues in dev_uninit() functions.
    Replace TRUE and FALSE with 1 and 0.
    
    Changes in V3:
    Rebased to use drivers/net/ixgbe directory.
    
    Changes in V2:
    Added call to dev_close() in dev_uninit() functions.
    Removed input parameter checks from dev_uninit() functions.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/ixgbe/ixgbe_ethdev.c |  111 ++++++++++++++++++++++++++++++++++++--
     drivers/net/ixgbe/ixgbe_ethdev.h |    2 +
     drivers/net/ixgbe/ixgbe_pf.c     |   23 ++++++++
     3 files changed, 131 insertions(+), 5 deletions(-)
    
    diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
    index f18550c..b657c38 100644
    --- a/drivers/net/ixgbe/ixgbe_ethdev.c
    +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
    @@ -117,6 +117,7 @@
     #define IXGBE_QUEUE_STAT_COUNTERS (sizeof(hw_stats->qprc) / sizeof(hw_stats->qprc[0]))
     
     static int eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev);
    +static int eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev);
     static int  ixgbe_dev_configure(struct rte_eth_dev *dev);
     static int  ixgbe_dev_start(struct rte_eth_dev *dev);
     static void ixgbe_dev_stop(struct rte_eth_dev *dev);
    @@ -183,6 +184,7 @@ static void ixgbe_dcb_init(struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_conf
     
     /* For Virtual Function support */
     static int eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev);
    +static int eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev);
     static int  ixgbevf_dev_configure(struct rte_eth_dev *dev);
     static int  ixgbevf_dev_start(struct rte_eth_dev *dev);
     static void ixgbevf_dev_stop(struct rte_eth_dev *dev);
    @@ -922,6 +924,59 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)
     	return 0;
     }
     
    +static int
    +eth_ixgbe_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct rte_pci_device *pci_dev;
    +	struct ixgbe_hw *hw;
    +	unsigned i;
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	hw = IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
    +	pci_dev = eth_dev->pci_dev;
    +
    +	if (hw->adapter_stopped == 0)
    +		ixgbe_dev_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	/* Unlock any pending hardware semaphore */
    +	ixgbe_swfw_lock_reset(hw);
    +
    +	/* disable uio intr before callback unregister */
    +	rte_intr_disable(&(pci_dev->intr_handle));
    +	rte_intr_callback_unregister(&(pci_dev->intr_handle),
    +		ixgbe_dev_interrupt_handler, (void *)eth_dev);
    +
    +	/* uninitialize PF if max_vfs not zero */
    +	ixgbe_pf_host_uninit(eth_dev);
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_rx_queues = 0;
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_tx_queues = 0;
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	rte_free(eth_dev->data->hash_mac_addrs);
    +	eth_dev->data->hash_mac_addrs = NULL;
    +
    +	return 0;
    +}
     
     /*
      * Negotiate mailbox API version with the PF.
    @@ -1092,13 +1147,58 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
     	return 0;
     }
     
    +/* Virtual Function device uninit */
    +
    +static int
    +eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct ixgbe_hw *hw;
    +	unsigned i;
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
    +		return -EPERM;
    +
    +	hw = IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
    +
    +	if (hw->adapter_stopped == 0)
    +		ixgbevf_dev_close(eth_dev);
    +
    +	eth_dev->dev_ops = NULL;
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +
    +	/* Disable the interrupts for VF */
    +	ixgbevf_intr_disable(hw);
    +
    +	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
    +		ixgbe_dev_rx_queue_release(eth_dev->data->rx_queues[i]);
    +		eth_dev->data->rx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_rx_queues = 0;
    +
    +	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
    +		ixgbe_dev_tx_queue_release(eth_dev->data->tx_queues[i]);
    +		eth_dev->data->tx_queues[i] = NULL;
    +	}
    +	eth_dev->data->nb_tx_queues = 0;
    +
    +	rte_free(eth_dev->data->mac_addrs);
    +	eth_dev->data->mac_addrs = NULL;
    +
    +	return 0;
    +}
    +
     static struct eth_driver rte_ixgbe_pmd = {
     	.pci_drv = {
     		.name = "rte_ixgbe_pmd",
     		.id_table = pci_id_ixgbe_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
    +			RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_ixgbe_dev_init,
    +	.eth_dev_uninit = eth_ixgbe_dev_uninit,
     	.dev_private_size = sizeof(struct ixgbe_adapter),
     };
     
    @@ -1109,9 +1209,10 @@ static struct eth_driver rte_ixgbevf_pmd = {
     	.pci_drv = {
     		.name = "rte_ixgbevf_pmd",
     		.id_table = pci_id_ixgbevf_map,
    -		.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
    +		.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE,
     	},
     	.eth_dev_init = eth_ixgbevf_dev_init,
    +	.eth_dev_uninit = eth_ixgbevf_dev_uninit,
     	.dev_private_size = sizeof(struct ixgbe_adapter),
     };
     
    @@ -1481,7 +1582,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
     	}
     
     	/* stop adapter */
    -	hw->adapter_stopped = FALSE;
    +	hw->adapter_stopped = 0;
     	ixgbe_stop_adapter(hw);
     
     	/* reinitialize adapter
    @@ -1639,7 +1740,7 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
     
     	/* reset the NIC */
     	ixgbe_pf_reset_hw(hw);
    -	hw->adapter_stopped = FALSE;
    +	hw->adapter_stopped = 0;
     
     	/* stop adapter */
     	ixgbe_stop_adapter(hw);
    @@ -3043,7 +3144,7 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev)
     
     	PMD_INIT_FUNC_TRACE();
     
    -	hw->adapter_stopped = TRUE;
    +	hw->adapter_stopped = 1;
     	ixgbe_stop_adapter(hw);
     
     	/*
    diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
    index 19237b8..710ee87 100644
    --- a/drivers/net/ixgbe/ixgbe_ethdev.h
    +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
    @@ -389,6 +389,8 @@ void ixgbe_vlan_hw_strip_disable_all(struct rte_eth_dev *dev);
     
     void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev);
     
    +void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev);
    +
     void ixgbe_pf_mbx_process(struct rte_eth_dev *eth_dev);
     
     int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev);
    diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
    index caed137..46d1ea9 100644
    --- a/drivers/net/ixgbe/ixgbe_pf.c
    +++ b/drivers/net/ixgbe/ixgbe_pf.c
    @@ -144,6 +144,29 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
     	return;
     }
     
    +void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
    +{
    +	struct ixgbe_vf_info **vfinfo;
    +	uint16_t vf_num;
    +
    +	PMD_INIT_FUNC_TRACE();
    +
    +	vfinfo = IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
    +
    +	RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
    +	RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = 0;
    +	RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = 0;
    +	RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = 0;
    +
    +	vf_num = dev_num_vf(eth_dev);
    +	if (vf_num == 0)
    +		return;
    +
    +	rte_free(*vfinfo);
    +	*vfinfo = NULL;
    +}
    +
    +
     int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)
     {
     	uint32_t vtctl, fcrth;
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH] librte_ether: release memory in uninit function.
           [not found] <PATCH>
                       ` (11 preceding siblings ...)
      2015-06-24 15:08 ` [PATCH v5] ixgbe: changes to support PCI Port Hotplug Bernard Iremonger
    @ 2015-06-25 14:30 ` Bernard Iremonger
      2015-06-25 14:41   ` Stephen Hemminger
      2015-06-25 18:32   ` Ananyev, Konstantin
      2015-06-26  9:32 ` [PATCH v2] " Bernard Iremonger
                       ` (29 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-25 14:30 UTC (permalink / raw)
      To: dev
    
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     lib/librte_ether/rte_ethdev.c |    8 +++++++-
     1 files changed, 7 insertions(+), 1 deletions(-)
    
    diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
    index e13fde5..2404556 100644
    --- a/lib/librte_ether/rte_ethdev.c
    +++ b/lib/librte_ether/rte_ethdev.c
    @@ -369,8 +369,14 @@ rte_eth_dev_uninit(struct rte_pci_device *pci_dev)
     	/* free ether device */
     	rte_eth_dev_release_port(eth_dev);
     
    -	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
    +	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
    +		rte_free(eth_dev->data->rx_queues);
    +		rte_free(eth_dev->data->tx_queues);
     		rte_free(eth_dev->data->dev_private);
    +		rte_free(eth_dev->data->mac_addrs);
    +		rte_free(eth_dev->data->hash_mac_addrs);
    +		memset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data));
    +	}
     
     	eth_dev->pci_dev = NULL;
     	eth_dev->driver = NULL;
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v2] librte_ether: release memory in uninit function.
           [not found] <PATCH>
                       ` (12 preceding siblings ...)
      2015-06-25 14:30 ` [PATCH] librte_ether: release memory in uninit function Bernard Iremonger
    @ 2015-06-26  9:32 ` Bernard Iremonger
      2015-06-26  9:55   ` Ananyev, Konstantin
      2015-06-29  8:54   ` Qiu, Michael
      2015-07-02 14:36 ` [PATCH v6 0/2] PCI Port Hotplug Bernard Iremonger
                       ` (28 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-06-26  9:32 UTC (permalink / raw)
      To: dev
    
    Changes in v2:
    do not free mac_addrs and hash_mac_addrs here.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     lib/librte_ether/rte_ethdev.c |    6 +++++-
     1 files changed, 5 insertions(+), 1 deletions(-)
    
    diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
    index e13fde5..7ae101a 100644
    --- a/lib/librte_ether/rte_ethdev.c
    +++ b/lib/librte_ether/rte_ethdev.c
    @@ -369,8 +369,12 @@ rte_eth_dev_uninit(struct rte_pci_device *pci_dev)
     	/* free ether device */
     	rte_eth_dev_release_port(eth_dev);
     
    -	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
    +	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
    +		rte_free(eth_dev->data->rx_queues);
    +		rte_free(eth_dev->data->tx_queues);
     		rte_free(eth_dev->data->dev_private);
    +		memset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data));
    +	}
     
     	eth_dev->pci_dev = NULL;
     	eth_dev->driver = NULL;
    -- 
    1.7.4.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v6 0/2] PCI Port Hotplug
           [not found] <PATCH>
                       ` (13 preceding siblings ...)
      2015-06-26  9:32 ` [PATCH v2] " Bernard Iremonger
    @ 2015-07-02 14:36 ` Bernard Iremonger
      2015-07-02 14:36   ` [PATCH v6 1/2] ixgbe: changes to support " Bernard Iremonger
                         ` (3 more replies)
      2015-07-03 14:03 ` [PATCH v6 0/7] i40e: PCI Port Hotplug Changes Bernard Iremonger
                       ` (27 subsequent siblings)
      42 siblings, 4 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-02 14:36 UTC (permalink / raw)
      To: dev
    
    Changes in V6:
    Rebased to latest code.
    Remove release of queue memory form dev_uninit() functions.
    Add ixgbe_dev_free_queues() function and call it from close() functions.
    
    Changes in V5:
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebased to latest ixgbe code.
    
    Changes in V4:
    Release rx and tx queues in dev_uninit() functions.
    Replace TRUE and FALSE with 1 and 0.
    
    Changes in V3:
    Rebased to use drivers/net/ixgbe directory.
    
    Changes in V2:
    Added call to dev_close() in dev_uninit() functions.
    Removed input parameter checks from dev_uninit() functions.
    
    Bernard Iremonger (2):
      ixgbe: changes to support PCI Port Hotplug
      ixgbe: release queue memory in close functions
    
     drivers/net/ixgbe/ixgbe_ethdev.c |  102 ++++++++++++++++++++++++++++++++++++--
     drivers/net/ixgbe/ixgbe_ethdev.h |    4 ++
     drivers/net/ixgbe/ixgbe_pf.c     |   22 ++++++++
     drivers/net/ixgbe/ixgbe_rxtx.c   |   19 +++++++
     4 files changed, 142 insertions(+), 5 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v6 0/7] i40e: PCI Port Hotplug Changes
           [not found] <PATCH>
                       ` (14 preceding siblings ...)
      2015-07-02 14:36 ` [PATCH v6 0/2] PCI Port Hotplug Bernard Iremonger
    @ 2015-07-03 14:03 ` Bernard Iremonger
      2015-07-03 14:03   ` [PATCH v6 1/7] i40e: changes to support PCI Port Hotplug Bernard Iremonger
                         ` (7 more replies)
      2015-07-03 14:38 ` [PATCH v7 0/2] e1000: PCI Port Hotplug changes Bernard Iremonger
                       ` (26 subsequent siblings)
      42 siblings, 8 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-03 14:03 UTC (permalink / raw)
      To: dev
    
    Changes in V6:
    Rebased to latest code.
    Removed release of rx and tx queues from uninit() functions.
    added patch 7, add function i40e_dev_free_queues() and call from close() functions.
    
    Changes in V5:
    Increased timeout in i40evf_wait_cmd_done()
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebased to latest i40e code.
    
    Changes in V4:
    added patch 6 to fix segmentation fault reported by Michael Qiu.
    Rebase to latest i40e code.
    
    Changes in V3:
    Release rx and tx queues in vf uninit function.
    Rebase to use latest i40e code.
    
    Changes in V2:
    Rebase to use drivers/net/i40e directory.
    
    
    Bernard Iremonger (7):
      i40e: changes to support PCI Port Hotplug
      i40e: release vmdq vsi's in dev_close
      i40e: increase ASQ_DELAY_MS to 100 and MAX_TRY_TIMES to 20 in
        i40evf_wait_cmd_done()
      i40e: call _clear_cmd() when error occurs
      i40e: clear queues in i40evf_dev_stop
      i40e: check rxq parameter in i40e_reset_rx_queue
      i40e: release queue memory in close functions
    
     drivers/net/i40e/i40e_ethdev.c    |   78 ++++++++++++++++++++++++++++++++++++-
     drivers/net/i40e/i40e_ethdev_vf.c |   62 ++++++++++++++++++++++++++---
     drivers/net/i40e/i40e_pf.c        |   34 ++++++++++++++++
     drivers/net/i40e/i40e_pf.h        |    1 +
     drivers/net/i40e/i40e_rxtx.c      |   25 ++++++++++++
     drivers/net/i40e/i40e_rxtx.h      |    1 +
     6 files changed, 193 insertions(+), 8 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v7 0/2] e1000: PCI Port Hotplug changes
           [not found] <PATCH>
                       ` (15 preceding siblings ...)
      2015-07-03 14:03 ` [PATCH v6 0/7] i40e: PCI Port Hotplug Changes Bernard Iremonger
    @ 2015-07-03 14:38 ` Bernard Iremonger
      2015-07-03 14:38   ` [PATCH v7 1/2] e1000: igb and em1000 " Bernard Iremonger
                         ` (2 more replies)
      2015-07-07  9:18 ` [PATCH v4 0/4] virtio: PCI Port Hotplug Bernard Iremonger
                       ` (25 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-03 14:38 UTC (permalink / raw)
      To: dev
    
    Changes in v7:
    Rebase to latest code.
    Remove freeing of queue memory from uninit functions
    Add patch 2, free queue memory in close functions
    
    Changes in v6:
    Set nb_rx_queues and nb_tx_queues to 0 in uninit functions.
    Rebase to latest code.
    
    Changes in v5:
    Moved adapter stopped boolean to struct e1000_adapter.
    Rebase to latest code.
    
    Changes in v4:
    Release rx and tx queues in eth_igbvf_dev_uninit.
    
    Changes in v3:
    Add igb_adapter_stopped and em_adapter_stopped booleans.
    Release rx and tx queues in eth_igb_dev_uninit.
    
    Changes in v2:
    Call dev_close() from  dev_uninit() functions.
    Remove input parameter checking from dev_uninit() functions.
    
    
    Bernard Iremonger (2):
      e1000: igb and em1000 PCI Port Hotplug changes
      e1000: free queue memory in close functions
    
     drivers/net/e1000/e1000_ethdev.h |   10 ++++-
     drivers/net/e1000/em_ethdev.c    |   47 ++++++++++++++++++-
     drivers/net/e1000/em_rxtx.c      |   18 +++++++
     drivers/net/e1000/igb_ethdev.c   |   96 ++++++++++++++++++++++++++++++++++++--
     drivers/net/e1000/igb_pf.c       |   22 +++++++++
     drivers/net/e1000/igb_rxtx.c     |   18 +++++++
     6 files changed, 205 insertions(+), 6 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v4 0/4] virtio: PCI Port Hotplug
           [not found] <PATCH>
                       ` (16 preceding siblings ...)
      2015-07-03 14:38 ` [PATCH v7 0/2] e1000: PCI Port Hotplug changes Bernard Iremonger
    @ 2015-07-07  9:18 ` Bernard Iremonger
      2015-07-07  9:18   ` [PATCH v4 1/4] virtio: add support for " Bernard Iremonger
                         ` (3 more replies)
      2015-07-07 10:21 ` [PATCH v4 0/3] bonding PCI Port Hotplug Bernard Iremonger
                       ` (24 subsequent siblings)
      42 siblings, 4 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-07  9:18 UTC (permalink / raw)
      To: dev
    
    This patchset contains changes to add support for PCI Port Hotplug
    It also contains a fix to virtqueue_detatch_unused().
    It also contains a fix to testpmd to facilate testing on VM's.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    Change to testpmd to facilate testing on VM.
    
    Changes in V3:
    Rebase to latest code.
    Free queue memory in uninit() function.
    
    Changes in V2:
    Rebase to use new drivers directory.
    Reuse memzones.
    
    Bernard Iremonger (4):
      virtio: add support for PCI Port Hotplug
      virtio: check vq parameter in virtqueue_detatch_unused() function
      virtio: free queue memory in virtio_dev_close()
      test-pmd: remove call to rte_eth_promiscuous_disable() from
        detach_port()
    
     app/test-pmd/testpmd.c             |    4 +-
     drivers/net/virtio/virtio_ethdev.c |   91 +++++++++++++++++++++++++++++++++---
     drivers/net/virtio/virtqueue.c     |   14 +++--
     3 files changed, 93 insertions(+), 16 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v4 0/3] bonding PCI Port Hotplug
           [not found] <PATCH>
                       ` (17 preceding siblings ...)
      2015-07-07  9:18 ` [PATCH v4 0/4] virtio: PCI Port Hotplug Bernard Iremonger
    @ 2015-07-07 10:21 ` Bernard Iremonger
      2015-07-07 10:21   ` [PATCH v4 1/3] bonding: add support for " Bernard Iremonger
                         ` (2 more replies)
      2015-07-07 13:09 ` [PATCH v4 0/1] ring PCI Port Hotplug Bernard Iremonger
                       ` (23 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-07 10:21 UTC (permalink / raw)
      To: dev
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    
    Changes in V3:
    Rebase to latest code.
    Modified testpmd to handle attach/detach of bonding pmd.
    
    Changes in V2:
    Rebased to use drivers/net/bonding dirctory
    Free rx and tx queues in uninit() function.
    
    Bernard Iremonger (3):
      bonding: add support for PCI Port Hotplug
      test-pmd: modified testpmd for link_bonding
      bonding: free queue memory in stop function
    
     app/test-pmd/cmdline.c                     |    4 +-
     app/test-pmd/testpmd.c                     |   24 ++++++++-
     app/test-pmd/testpmd.h                     |    7 ++-
     drivers/net/bonding/rte_eth_bond.h         |   13 +++++-
     drivers/net/bonding/rte_eth_bond_api.c     |   75 ++++++++++++++++++---------
     drivers/net/bonding/rte_eth_bond_pmd.c     |   41 +++++++++++++++-
     drivers/net/bonding/rte_eth_bond_private.h |    7 ++-
     7 files changed, 136 insertions(+), 35 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v4 0/1] ring PCI Port Hotplug
           [not found] <PATCH>
                       ` (18 preceding siblings ...)
      2015-07-07 10:21 ` [PATCH v4 0/3] bonding PCI Port Hotplug Bernard Iremonger
    @ 2015-07-07 13:09 ` Bernard Iremonger
      2015-07-07 13:09   ` [PATCH v4 1/1] ring: changes to support " Bernard Iremonger
      2015-07-13 13:04 ` [PATCH v3 0/2] librte_ether release memory Bernard Iremonger
                       ` (22 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-07 13:09 UTC (permalink / raw)
      To: dev
    
    Changes in V4:
    Rebase to latest code.
    Update commit line, no changes to code.
    
    Changes in V3:
    Rebase to use drivers/net/ring directory
    Handle no parameters case
    
    Changes in V2:
    Fix crash in the rte_pmd_ring_devuninit() function.
    
    Bernard Iremonger (1):
      ring: changes to support PCI Port Hotplug
    
     drivers/net/ring/rte_eth_ring.c |   97 ++++++++++++++++++++++++++++++---------
     1 files changed, 75 insertions(+), 22 deletions(-)
    
    -- 
    1.7.4.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v3 0/2] librte_ether release memory
           [not found] <PATCH>
                       ` (19 preceding siblings ...)
      2015-07-07 13:09 ` [PATCH v4 0/1] ring PCI Port Hotplug Bernard Iremonger
    @ 2015-07-13 13:04 ` Bernard Iremonger
      2015-07-13 13:04   ` [PATCH v3 1/2] librte_ether: release memory in uninit function Bernard Iremonger
                         ` (2 more replies)
      2015-07-14 13:10 ` [PATCH v5 0/4] virtio PCI Port Hotplug Bernard Iremonger
                       ` (21 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-13 13:04 UTC (permalink / raw)
      To: dev
    
    Changes in V3:
    Release queue array memory in rte_eth_dev_close() function
    
    Changes in V2:
    do not free mac_addrs and hash_mac_addrs in rte_eth_dev_uninit() function.
    
    Bernard Iremonger (2):
      librte_ether: release memory in uninit function.
      librte_ether: release queue array memory in close function
    
     lib/librte_ether/rte_ethdev.c | 11 ++++++++++-
     1 file changed, 10 insertions(+), 1 deletion(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v5 0/4] virtio PCI Port Hotplug
           [not found] <PATCH>
                       ` (20 preceding siblings ...)
      2015-07-13 13:04 ` [PATCH v3 0/2] librte_ether release memory Bernard Iremonger
    @ 2015-07-14 13:10 ` Bernard Iremonger
      2015-07-14 13:10   ` [PATCH 1/5] virtio: add support for " Bernard Iremonger
                         ` (4 more replies)
      2015-07-15 13:50 ` [PATCH v6 0/6] virtio PCI Port Hotplug Bernard Iremonger
                       ` (20 subsequent siblings)
      42 siblings, 5 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-14 13:10 UTC (permalink / raw)
      To: dev
    
    Changes in V5:
    Rebase.
    Add proper queue release patch (patch 3).
    Reorder patches, moved previous patch 3 to patch 4,
    moved previous patch 4 to patch 5.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    Change to testpmd to facilate testing on VM.
    
    Changes in V3:
    Rebase to latest code.
    Free queue memory in uninit() function.
    
    Changes in V2:
    Rebase to use new drivers directory.
    Reuse memzones.
    
    
    
    Bernard Iremonger (4):
      virtio: add support for PCI Port Hotplug
      virtio: check vq parameter in virtqueue_detatch_unused() function
      virtio: add proper queue release
      virtio: free queue memory in virtio_dev_close()
    
     drivers/net/virtio/virtio_ethdev.c | 122 +++++++++++++++++++++++++++++--------
     drivers/net/virtio/virtio_ethdev.h |   8 ++-
     drivers/net/virtio/virtio_rxtx.c   |  12 ++++
     drivers/net/virtio/virtqueue.c     |  14 +++--
     4 files changed, 124 insertions(+), 32 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v6 0/6] virtio PCI Port Hotplug
           [not found] <PATCH>
                       ` (21 preceding siblings ...)
      2015-07-14 13:10 ` [PATCH v5 0/4] virtio PCI Port Hotplug Bernard Iremonger
    @ 2015-07-15 13:50 ` Bernard Iremonger
      2015-07-15 13:51   ` [PATCH v6 1/6] virtio: add support for " Bernard Iremonger
                         ` (6 more replies)
      2015-07-15 15:32 ` [PATCH v5 0/3] bonding " Bernard Iremonger
                       ` (19 subsequent siblings)
      42 siblings, 7 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-15 13:50 UTC (permalink / raw)
      To: dev
    
    Changes in V6:
    Rebase.
    Use queue_release function in dev_uninit function (patch 5)
    Set vq to NULL in queue release function.
    Move previous patch 5 to patch 6.
    
    
    Changes in V5:
    Rebase.
    Add proper queue release patch (patch 3).
    Reorder patches, moved previous patch 3 to patch 4,
    moved previous patch 4 to patch 5.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    Change to testpmd to facilate testing on VM.
    
    Changes in V3:
    Rebase to latest code.
    Free queue memory in uninit() function.
    
    Changes in V2:
    Rebase to use new drivers directory.
    
    Bernard Iremonger (6):
      virtio: add support for PCI Port Hotplug
      virtio: check vq parameter in virtqueue_detatch_unused() function
      virtio: add proper queue release
      virtio: free queue memory in virtio_dev_close()
      virtio: use queue_release in dev_uninit
      test-pmd: remove call to rte_eth_promiscuous_disable() from
        detach_port()
    
     app/test-pmd/testpmd.c             |   4 +-
     drivers/net/virtio/virtio_ethdev.c | 120 +++++++++++++++++++++++++++++--------
     drivers/net/virtio/virtio_ethdev.h |   8 ++-
     drivers/net/virtio/virtio_rxtx.c   |  12 ++++
     drivers/net/virtio/virtqueue.c     |  14 +++--
     5 files changed, 123 insertions(+), 35 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v5 0/3] bonding PCI Port Hotplug
           [not found] <PATCH>
                       ` (22 preceding siblings ...)
      2015-07-15 13:50 ` [PATCH v6 0/6] virtio PCI Port Hotplug Bernard Iremonger
    @ 2015-07-15 15:32 ` Bernard Iremonger
      2015-07-15 15:32   ` [PATCH v5 1/3] bonding: add support for " Bernard Iremonger
                         ` (2 more replies)
      2015-07-21 15:16 ` [PATCH v6 0/3] bonding PCI Port Hotplug Bernard Iremonger
                       ` (18 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-15 15:32 UTC (permalink / raw)
      To: dev
    
    Changes in V5:
    Rebase.
    Refactor initialisation of static structures.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    
    Changes in V3:
    Rebase to latest code.
    Modified testpmd to handle attach/detach of bonding pmd.
    
    Changes in V2:
    Rebased to use drivers/net/bonding dirctory
    Free rx and tx queues in uninit() function.
    
    Bernard Iremonger (3):
      bonding: add support for PCI Port Hotplug
      test-pmd: modified testpmd for link_bonding
      bonding: free queue memory in stop function
    
     app/test-pmd/cmdline.c                     |  4 +-
     app/test-pmd/testpmd.c                     | 24 +++++++--
     app/test-pmd/testpmd.h                     |  7 ++-
     drivers/net/bonding/rte_eth_bond.h         | 13 ++++-
     drivers/net/bonding/rte_eth_bond_api.c     | 78 +++++++++++++++++++-----------
     drivers/net/bonding/rte_eth_bond_pmd.c     | 41 +++++++++++++++-
     drivers/net/bonding/rte_eth_bond_private.h |  7 ++-
     7 files changed, 137 insertions(+), 37 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v6 0/3] bonding PCI Port Hotplug
           [not found] <PATCH>
                       ` (23 preceding siblings ...)
      2015-07-15 15:32 ` [PATCH v5 0/3] bonding " Bernard Iremonger
    @ 2015-07-21 15:16 ` Bernard Iremonger
      2015-07-21 15:16   ` [PATCH v6 1/3] bonding: add support for " Bernard Iremonger
                         ` (2 more replies)
      2015-07-27 15:54 ` [PATCH v7 0/4] bonding PCI Port Hotplug Bernard Iremonger
                       ` (17 subsequent siblings)
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-21 15:16 UTC (permalink / raw)
      To: dev
    
    Changes in V6:
    Rebase.
    add rte_eth_bond_free() to rte_eth_bond_version.map
    
    Changes in V5:
    Rebase.
    Refactor initialisation of static structures.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    
    Changes in V3:
    Rebase to latest code.
    Modified testpmd to handle attach/detach of bonding pmd.
    
    Changes in V2:
    Rebased to use drivers/net/bonding dirctory
    Free rx and tx queues in uninit() function.
    
    Bernard Iremonger (3):
      bonding: add support for PCI Port Hotplug
      test-pmd: modified testpmd for link_bonding
      bonding: free queue memory in stop function
    
     app/test-pmd/cmdline.c                       |  4 +-
     app/test-pmd/testpmd.c                       | 22 +++++++-
     app/test-pmd/testpmd.h                       |  7 ++-
     drivers/net/bonding/rte_eth_bond.h           | 13 ++++-
     drivers/net/bonding/rte_eth_bond_api.c       | 78 ++++++++++++++++++----------
     drivers/net/bonding/rte_eth_bond_pmd.c       | 41 ++++++++++++++-
     drivers/net/bonding/rte_eth_bond_private.h   |  7 ++-
     drivers/net/bonding/rte_eth_bond_version.map |  1 +
     8 files changed, 137 insertions(+), 36 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v7 0/4] bonding PCI Port Hotplug
           [not found] <PATCH>
                       ` (24 preceding siblings ...)
      2015-07-21 15:16 ` [PATCH v6 0/3] bonding PCI Port Hotplug Bernard Iremonger
    @ 2015-07-27 15:54 ` Bernard Iremonger
      2015-07-27 15:54   ` [PATCH v7 1/4] bonding: add support for " Bernard Iremonger
                         ` (4 more replies)
      2015-08-04 15:26 ` [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() Bernard Iremonger
                       ` (16 subsequent siblings)
      42 siblings, 5 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-07-27 15:54 UTC (permalink / raw)
      To: dev
    
    Changes in V7:
    Rebase.
    Move call of bond_ethdev_free_queues() from bond_ethdev_stop() to
    bond_ethdev_close().
    Add patch 4, doc patch for testpmd_app_ug, adds bonding example.
    
    Changes in V6:
    Rebase.
    add rte_eth_bond_free() to rte_eth_bond_version.map
    
    Changes in V5:
    Rebase.
    Refactor initialisation of static structures.
    
    Changes in V4:
    Rebase to latest code.
    Move freeing of queue memory from uninit() function to close() function.
    
    Changes in V3:
    Rebase to latest code.
    Modified testpmd to handle attach/detach of bonding pmd.
    
    Changes in V2:
    Rebased to use drivers/net/bonding dirctory
    Free rx and tx queues in uninit() function.
    
    Bernard Iremonger (4):
      bonding: add support for PCI Port Hotplug
      test-pmd: modified testpmd for link_bonding
      bonding: free queue memory in close function
      testpmd_app_ug: add example of re-attaching bonded port
    
     app/test-pmd/cmdline.c                       |  4 +-
     app/test-pmd/testpmd.c                       | 22 +++++++-
     app/test-pmd/testpmd.h                       |  7 ++-
     doc/guides/testpmd_app_ug/testpmd_funcs.rst  | 13 +++++
     drivers/net/bonding/rte_eth_bond.h           | 13 ++++-
     drivers/net/bonding/rte_eth_bond_api.c       | 80 ++++++++++++++++++----------
     drivers/net/bonding/rte_eth_bond_pmd.c       | 44 +++++++++++++--
     drivers/net/bonding/rte_eth_bond_private.h   | 10 +++-
     drivers/net/bonding/rte_eth_bond_version.map |  1 +
     9 files changed, 156 insertions(+), 38 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create()
           [not found] <PATCH>
                       ` (25 preceding siblings ...)
      2015-07-27 15:54 ` [PATCH v7 0/4] bonding PCI Port Hotplug Bernard Iremonger
    @ 2015-08-04 15:26 ` Bernard Iremonger
      2015-08-04 15:52   ` Thomas Monjalon
      2015-08-05 12:36 ` [PATCH v2 " Bernard Iremonger
                       ` (15 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-08-04 15:26 UTC (permalink / raw)
      To: dev
    
    if the name parameter to rte_eth_bond_create() was NULL,
    there was a segmentation fault.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/bonding/rte_eth_bond_api.c | 26 ++++++++++++++++----------
     1 file changed, 16 insertions(+), 10 deletions(-)
    
    diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
    index 4ca26dd..ffac3c9 100644
    --- a/drivers/net/bonding/rte_eth_bond_api.c
    +++ b/drivers/net/bonding/rte_eth_bond_api.c
    @@ -194,19 +194,19 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     
     	if (name == NULL) {
     		RTE_BOND_LOG(ERR, "Invalid name specified");
    -		goto err;
    +		goto err1;
     	}
     
     	if (socket_id >= number_of_sockets()) {
     		RTE_BOND_LOG(ERR,
     				"Invalid socket id specified to create bonded device on.");
    -		goto err;
    +		goto err1;
     	}
     
     	pci_dev = rte_zmalloc_socket(name, sizeof(*pci_dev), 0, socket_id);
     	if (pci_dev == NULL) {
     		RTE_BOND_LOG(ERR, "Unable to malloc pci dev on socket");
    -		goto err;
    +		goto err1;
     	}
     
     	pci_drv = &rte_bond_pmd.pci_drv;
    @@ -214,14 +214,14 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     	internals = rte_zmalloc_socket(name, sizeof(*internals), 0, socket_id);
     	if (internals == NULL) {
     		RTE_BOND_LOG(ERR, "Unable to malloc internals on socket");
    -		goto err;
    +		goto err2;
     	}
     
     	/* reserve an ethdev entry */
     	eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL);
     	if (eth_dev == NULL) {
     		RTE_BOND_LOG(ERR, "Unable to allocate rte_eth_dev");
    -		goto err;
    +		goto err3;
     	}
     
     	pci_dev->numa_node = socket_id;
    @@ -239,6 +239,10 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     
     	eth_dev->data->mac_addrs = rte_zmalloc_socket(name, ETHER_ADDR_LEN, 0,
     			socket_id);
    +	if (eth_dev->data->mac_addrs == NULL) {
    +		RTE_BOND_LOG(ERR, "Unable to malloc mac_addrs");
    +		goto err3;
    +	}
     
     	eth_dev->data->dev_started = 0;
     	eth_dev->data->promiscuous = 0;
    @@ -277,16 +281,18 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     	if (bond_ethdev_mode_set(eth_dev, mode)) {
     		RTE_BOND_LOG(ERR, "Failed to set bonded device %d mode too %d",
     				 eth_dev->data->port_id, mode);
    -		goto err;
    +		goto err4;
     	}
     
     	return eth_dev->data->port_id;
     
    -err:
    -	rte_free(pci_dev);
    -	rte_free(internals);
    +err4:
     	rte_free(eth_dev->data->mac_addrs);
    -
    +err3:
    +	rte_free(internals);
    +err2:
    +	rte_free(pci_dev);
    +err1:
     	return -1;
     }
     
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v2 1/1] bonding: fix error handling in rte_eth_bond_create()
           [not found] <PATCH>
                       ` (26 preceding siblings ...)
      2015-08-04 15:26 ` [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() Bernard Iremonger
    @ 2015-08-05 12:36 ` Bernard Iremonger
      2015-08-05 12:48   ` Liu, Yong
      2015-08-05 13:15   ` Thomas Monjalon
      2015-08-05 14:04 ` [PATCH v3 1/1] bonding: fix device initialisation error handling Bernard Iremonger
                       ` (14 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-08-05 12:36 UTC (permalink / raw)
      To: dev
    
    if the name parameter to rte_eth_bond_create() was NULL,
    there was a segmentation fault because eth_dev was also NULL.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
    index 4ca26dd..0681d1a 100644
    --- a/drivers/net/bonding/rte_eth_bond_api.c
    +++ b/drivers/net/bonding/rte_eth_bond_api.c
    @@ -239,6 +239,10 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     
     	eth_dev->data->mac_addrs = rte_zmalloc_socket(name, ETHER_ADDR_LEN, 0,
     			socket_id);
    +	if (eth_dev->data->mac_addrs == NULL) {
    +		RTE_BOND_LOG(ERR, "Unable to malloc mac_addrs");
    +		goto err;
    +	}
     
     	eth_dev->data->dev_started = 0;
     	eth_dev->data->promiscuous = 0;
    @@ -285,8 +289,10 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     err:
     	rte_free(pci_dev);
     	rte_free(internals);
    -	rte_free(eth_dev->data->mac_addrs);
    -
    +	if (eth_dev != NULL) {
    +		rte_free(eth_dev->data->mac_addrs);
    +		rte_eth_dev_release_port(eth_dev);
    +	}
     	return -1;
     }
     
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v3 1/1] bonding: fix device initialisation error handling
           [not found] <PATCH>
                       ` (27 preceding siblings ...)
      2015-08-05 12:36 ` [PATCH v2 " Bernard Iremonger
    @ 2015-08-05 14:04 ` Bernard Iremonger
      2015-08-06  8:19   ` Jastrzebski, MichalX K
      2015-09-28 13:03 ` [PATCH 00/20] remove pci driver from vdevs Bernard Iremonger
                       ` (13 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-08-05 14:04 UTC (permalink / raw)
      To: dev
    
    If the name parameter to rte_eth_bond_create() was NULL,
    there was a segmentation fault because eth_dev was also NULL.
    Add error handling of mac_addrs memory allocation.
    Add call to rte_eth_dev_release_port() in error handling.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/bonding/rte_eth_bond_api.c | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
    index 4ca26dd..0681d1a 100644
    --- a/drivers/net/bonding/rte_eth_bond_api.c
    +++ b/drivers/net/bonding/rte_eth_bond_api.c
    @@ -239,6 +239,10 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     
     	eth_dev->data->mac_addrs = rte_zmalloc_socket(name, ETHER_ADDR_LEN, 0,
     			socket_id);
    +	if (eth_dev->data->mac_addrs == NULL) {
    +		RTE_BOND_LOG(ERR, "Unable to malloc mac_addrs");
    +		goto err;
    +	}
     
     	eth_dev->data->dev_started = 0;
     	eth_dev->data->promiscuous = 0;
    @@ -285,8 +289,10 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
     err:
     	rte_free(pci_dev);
     	rte_free(internals);
    -	rte_free(eth_dev->data->mac_addrs);
    -
    +	if (eth_dev != NULL) {
    +		rte_free(eth_dev->data->mac_addrs);
    +		rte_eth_dev_release_port(eth_dev);
    +	}
     	return -1;
     }
     
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH 00/20] remove pci driver from vdevs
           [not found] <PATCH>
                       ` (28 preceding siblings ...)
      2015-08-05 14:04 ` [PATCH v3 1/1] bonding: fix device initialisation error handling Bernard Iremonger
    @ 2015-09-28 13:03 ` Bernard Iremonger
      2015-09-28 13:03   ` [PATCH 01/20] librte_eal: add RTE_KDRV_NONE for vdevs Bernard Iremonger
                         ` (19 more replies)
      2015-10-01 15:16 ` [PATCH 0/1] vmxnet3 hotplug support Bernard Iremonger
                       ` (12 subsequent siblings)
      42 siblings, 20 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-09-28 13:03 UTC (permalink / raw)
      To: dev
    
    There is a dummy pci driver in the vdev PMD's at present.
    This patch set removes the pci driver from the vdev PMD's.
    Changes have been made to librte_ether to handle vdevs and pdevs in the same way.
    
    The following vdev PMD's have had the pci driver removed:
    
    null
    ring
    bonding
    pcap
    af_packet
    xenvirt
    mpipe
    
    All the pdev PMD's have been modified to copy the pci device info into ethdev data.
    
    Bernard Iremonger (17):
      librte_eal: add RTE_KDRV_NONE for vdevs
      librte_ether: add fields from rte_pci_driver to rte_eth_dev_data
      librte_ether: add function rte_eth_copy_dev_info()
      null: remove pci device driver
      ring: remove pci device driver
      bonding: remove pci device driver
      pcap: remove pci device driver
      ixgbe: copy pci device info to eth_dev data
      e1000: copy pci device info to eth_dev data
      i40e: copy pci device info to eth_dev data
      fm10k: copy pci device info to eth_dev data
      bnx2x: copy pci device info to eth_dev data
      cxgbe: copy pci device info to eth_dev data
      enic: copy pci device info to eth_dev data
      mlx4: copy pci device info to eth_dev data
      virtio: copy pci device info to eth_dev data
      vmxnet3: copy pci device info to eth_dev data
    
    David Hunt (3):
      af_packet: remove pci device driver
      xenvirt: remove pci device driver
      mpipe: remove pci device driver
    
     drivers/net/af_packet/rte_eth_af_packet.c  | 20 +++++------
     drivers/net/bnx2x/bnx2x_ethdev.c           |  4 +++
     drivers/net/bonding/rte_eth_bond_alb.c     |  2 +-
     drivers/net/bonding/rte_eth_bond_api.c     | 58 +++++++++---------------------
     drivers/net/bonding/rte_eth_bond_pmd.c     | 16 ++++-----
     drivers/net/bonding/rte_eth_bond_private.h |  2 +-
     drivers/net/cxgbe/cxgbe_ethdev.c           |  5 +++
     drivers/net/e1000/em_ethdev.c              |  3 ++
     drivers/net/e1000/igb_ethdev.c             |  5 +++
     drivers/net/enic/enic_ethdev.c             |  2 ++
     drivers/net/fm10k/fm10k_ethdev.c           |  2 ++
     drivers/net/i40e/i40e_ethdev.c             |  3 ++
     drivers/net/i40e/i40e_ethdev_vf.c          |  2 ++
     drivers/net/ixgbe/ixgbe_ethdev.c           |  4 +++
     drivers/net/mlx4/mlx4.c                    |  4 +++
     drivers/net/mpipe/mpipe_tilegx.c           | 10 ++++--
     drivers/net/null/rte_eth_null.c            | 32 +++++------------
     drivers/net/pcap/rte_eth_pcap.c            | 31 +++++-----------
     drivers/net/ring/rte_eth_ring.c            | 37 +++++--------------
     drivers/net/virtio/virtio_ethdev.c         |  3 ++
     drivers/net/vmxnet3/vmxnet3_ethdev.c       |  2 ++
     drivers/net/xenvirt/rte_eth_xenvirt.c      | 14 +++-----
     lib/librte_eal/common/include/rte_pci.h    |  3 +-
     lib/librte_ether/rte_ethdev.c              | 54 ++++++++++++++++------------
     lib/librte_ether/rte_ethdev.h              | 29 +++++++++++++++
     lib/librte_ether/rte_ether_version.map     |  7 ++++
     26 files changed, 180 insertions(+), 174 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH 0/1]  vmxnet3 hotplug support
           [not found] <PATCH>
                       ` (29 preceding siblings ...)
      2015-09-28 13:03 ` [PATCH 00/20] remove pci driver from vdevs Bernard Iremonger
    @ 2015-10-01 15:16 ` Bernard Iremonger
      2015-10-01 15:16   ` [PATCH 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
      2015-10-02  9:08 ` [PATCH 1/2] xenvirt: add support for PCI Port Hotplug Bernard Iremonger
                       ` (11 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-01 15:16 UTC (permalink / raw)
      To: dev
    
    add PCI Port Hotplug support to the vmxnet3 PMD
    
    
    This patch depends on 4 patches from the following patch set:
    
    0000-remove-pci-driver-from-vdevs.patch 
    
    0001-librte_eal-add-RTE_KDRV_NONE-for-vdevs.patch
    0002-librte_ether-add-fields-from-rte_pci_driver-to-rte_e.patch
    0003-librte_ether-add-function-rte_eth_copy_dev_info.patch
    0020-vmxnet3-copy-pci-device-info-to-eth_dev-data.patch
    
    Bernard Iremonger (1):
      vmxnet3: add PCI Port Hotplug support
    
     drivers/net/vmxnet3/vmxnet3_ethdev.c | 33 +++++++++++++++++++++++++++++----
     1 file changed, 29 insertions(+), 4 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH 1/2] xenvirt: add support for PCI Port Hotplug
           [not found] <PATCH>
                       ` (30 preceding siblings ...)
      2015-10-01 15:16 ` [PATCH 0/1] vmxnet3 hotplug support Bernard Iremonger
    @ 2015-10-02  9:08 ` Bernard Iremonger
      2015-10-02  9:08   ` [PATCH 2/2] xenvirt: free queues in dev_close Bernard Iremonger
      2015-10-02  9:09 ` [PATCH] vhost_xen: fix compile error in main.c Bernard Iremonger
                       ` (10 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-02  9:08 UTC (permalink / raw)
      To: dev
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/xenvirt/rte_eth_xenvirt.c | 63 +++++++++++++++++++++++++++++++----
     drivers/net/xenvirt/rte_xen_lib.c     | 26 ++++++++++++---
     drivers/net/xenvirt/rte_xen_lib.h     |  5 ++-
     3 files changed, 83 insertions(+), 11 deletions(-)
    
    diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c
    index b3383af..8923826 100644
    --- a/drivers/net/xenvirt/rte_eth_xenvirt.c
    +++ b/drivers/net/xenvirt/rte_eth_xenvirt.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
    @@ -642,10 +642,14 @@ eth_dev_xenvirt_create(const char *name, const char *params,
     	if (internals == NULL)
     		goto err;
     
    -	/* reserve an ethdev entry */
    -	eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL);
    -	if (eth_dev == NULL)
    -		goto err;
    +	/* find an ethdev entry */
    +	eth_dev = rte_eth_dev_allocated(name);
    +	if (eth_dev == NULL) {
    +		/* reserve an ethdev entry */
    +		eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL);
    +		if (eth_dev == NULL)
    +			goto err;
    +	}
     
     	data->dev_private = internals;
     	data->port_id = eth_dev->data->port_id;
    @@ -661,7 +665,7 @@ eth_dev_xenvirt_create(const char *name, const char *params,
     
     	eth_dev->data = data;
     	eth_dev->dev_ops = &ops;
    -	eth_dev->data->dev_flags = 0;
    +	eth_dev->data->dev_flags = RTE_PCI_DRV_DETACHABLE;
     	eth_dev->data->kdrv = RTE_KDRV_NONE;
     	eth_dev->data->drv_name = NULL;
     	eth_dev->driver = NULL;
    @@ -683,6 +687,38 @@ err:
     }
     
     
    +static int
    +eth_dev_xenvirt_free(const char *name, const unsigned numa_node)
    +{
    +	struct rte_eth_dev *eth_dev = NULL;
    +
    +	RTE_LOG(DEBUG, PMD,
    +		"Free virtio rings backed ethdev on numa socket %u\n",
    +		numa_node);
    +
    +	/* find an ethdev entry */
    +	eth_dev = rte_eth_dev_allocated(name);
    +	if (eth_dev == NULL)
    +		return -1;
    +
    +	if (eth_dev->data->dev_started == 1) {
    +		eth_dev_stop(eth_dev);
    +		eth_dev_close(eth_dev);
    +	}
    +
    +	eth_dev->rx_pkt_burst = NULL;
    +	eth_dev->tx_pkt_burst = NULL;
    +	eth_dev->dev_ops = NULL;
    +
    +	rte_free(eth_dev->data);
    +	rte_free(eth_dev->data->dev_private);
    +	rte_free(eth_dev->data->mac_addrs);
    +
    +	virtio_idx--;
    +
    +	return 0;
    +}
    +
     /*TODO: Support multiple process model */
     static int
     rte_pmd_xenvirt_devinit(const char *name, const char *params)
    @@ -701,10 +737,25 @@ rte_pmd_xenvirt_devinit(const char *name, const char *params)
     	return 0;
     }
     
    +static int
    +rte_pmd_xenvirt_devuninit(const char *name)
    +{
    +	eth_dev_xenvirt_free(name, rte_socket_id());
    +
    +	if (virtio_idx == 0) {
    +		if (xenstore_uninit() != 0)
    +			RTE_LOG(ERR, PMD, "%s: xenstore uninit failed\n", __func__);
    +
    +		gntalloc_close();
    +	}
    +	return 0;
    +}
    +
     static struct rte_driver pmd_xenvirt_drv = {
     	.name = "eth_xenvirt",
     	.type = PMD_VDEV,
     	.init = rte_pmd_xenvirt_devinit,
    +	.uninit = rte_pmd_xenvirt_devuninit,
     };
     
     PMD_REGISTER_DRIVER(pmd_xenvirt_drv);
    diff --git a/drivers/net/xenvirt/rte_xen_lib.c b/drivers/net/xenvirt/rte_xen_lib.c
    index b3932f0..5900b53 100644
    --- a/drivers/net/xenvirt/rte_xen_lib.c
    +++ b/drivers/net/xenvirt/rte_xen_lib.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
    @@ -50,6 +50,7 @@
     
     #include <rte_common.h>
     #include <rte_string_fns.h>
    +#include <rte_malloc.h>
     
     #include "rte_xen_lib.h"
     
    @@ -72,6 +73,8 @@ int gntalloc_fd = -1;
     static char *dompath = NULL;
     /* handle to xenstore read/write operations */
     static struct xs_handle *xs = NULL;
    +/* flag to indicate if xenstore cleanup is required */
    +static bool is_xenstore_cleaned_up;
     
     /*
      * Reserve a virtual address space.
    @@ -275,7 +278,6 @@ xenstore_init(void)
     {
     	unsigned int len, domid;
     	char *buf;
    -	static int cleanup = 0;
     	char *end;
     
     	xs = xs_domain_open();
    @@ -301,16 +303,32 @@ xenstore_init(void)
     
     	xs_transaction_start(xs); /* When to stop transaction */
     
    -	if (cleanup == 0) {
    +	if (is_xenstore_cleaned_up == 0) {
     		if (xenstore_cleanup())
     			return -1;
    -		cleanup = 1;
    +		is_xenstore_cleaned_up = 1;
     	}
     
     	return 0;
     }
     
     int
    +xenstore_uninit(void)
    +{
    +	xs_close(xs);
    +
    +	if (is_xenstore_cleaned_up == 0) {
    +		if (xenstore_cleanup())
    +			return -1;
    +		is_xenstore_cleaned_up = 1;
    +	}
    +	free(dompath);
    +	dompath = NULL;
    +
    +	return 0;
    +}
    +
    +int
     xenstore_write(const char *key_str, const char *val_str)
     {
     	char grant_path[PATH_MAX];
    diff --git a/drivers/net/xenvirt/rte_xen_lib.h b/drivers/net/xenvirt/rte_xen_lib.h
    index 0ba7148..d973eac 100644
    --- a/drivers/net/xenvirt/rte_xen_lib.h
    +++ b/drivers/net/xenvirt/rte_xen_lib.h
    @@ -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
    @@ -93,6 +93,9 @@ int
     xenstore_init(void);
     
     int
    +xenstore_uninit(void);
    +
    +int
     xenstore_write(const char *key_str, const char *val_str);
     
     int
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH] vhost_xen: fix compile error in main.c
           [not found] <PATCH>
                       ` (31 preceding siblings ...)
      2015-10-02  9:08 ` [PATCH 1/2] xenvirt: add support for PCI Port Hotplug Bernard Iremonger
    @ 2015-10-02  9:09 ` Bernard Iremonger
      2015-10-02  9:20 ` [PATCH 0/2] xenvirt hotplug support Bernard Iremonger
                       ` (9 subsequent siblings)
      42 siblings, 0 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-02  9:09 UTC (permalink / raw)
      To: dev
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     examples/vhost_xen/main.c | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    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 related	[flat|nested] 275+ messages in thread
  • * [PATCH 0/2] xenvirt hotplug support
           [not found] <PATCH>
                       ` (32 preceding siblings ...)
      2015-10-02  9:09 ` [PATCH] vhost_xen: fix compile error in main.c Bernard Iremonger
    @ 2015-10-02  9:20 ` Bernard Iremonger
      2015-10-12 16:25 ` [PATCH v3 00/20] remove pci driver from vdevs Bernard Iremonger
                       ` (8 subsequent siblings)
      42 siblings, 0 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-02  9:20 UTC (permalink / raw)
      To: dev
    
    add PCI Port Hotplug support to the xenvirt PMD
    
    
    This patch depends on 4 patches from the following patch set:
    
    0000-remove-pci-driver-from-vdevs.patch 
    
    0001-librte_eal-add-RTE_KDRV_NONE-for-vdevs.patch
    0002-librte_ether-add-fields-from-rte_pci_driver-to-rte_e.patch
    0003-librte_ether-add-function-rte_eth_copy_dev_info.patch
    0009-xenvirt-copy-pci-device-info-to-eth_dev-data.patch
    
    Bernard Iremonger (2):
      xenvirt: add support for PCI Port Hotplug
      xenvirt: free queues in dev_close
    
     drivers/net/xenvirt/rte_eth_xenvirt.c | 87 +++++++++++++++++++++++++++++++----
     drivers/net/xenvirt/rte_xen_lib.c     | 26 +++++++++--
     drivers/net/xenvirt/rte_xen_lib.h     |  5 +-
     3 files changed, 105 insertions(+), 13 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v3 00/20] remove pci driver from vdevs
           [not found] <PATCH>
                       ` (33 preceding siblings ...)
      2015-10-02  9:20 ` [PATCH 0/2] xenvirt hotplug support Bernard Iremonger
    @ 2015-10-12 16:25 ` Bernard Iremonger
      2015-10-12 16:25   ` [PATCH v3 01/20] librte_eal: add RTE_KDRV_NONE for vdevs Bernard Iremonger
                         ` (19 more replies)
      2015-10-20 15:37 ` [PATCH 1/2] virtio: fixed segmentation fault in queue_release Bernard Iremonger
                       ` (7 subsequent siblings)
      42 siblings, 20 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-12 16:25 UTC (permalink / raw)
      To: dev
    
    There is a dummy pci driver in the vdev PMD's at present.
    This patch set removes the pci driver from the vdev PMD's.
    Changes have been made to librte_ether to handle vdevs and pdevs in the same way.
    
    The following vdev PMD's have had the pci driver removed:
    
    null
    ring
    bonding
    pcap
    af_packet
    xenvirt
    mpipe
    
    All the pdev PMD's have been modified to copy the pci device info into ethdev data.
    
    Changes in v3:
    rebase to latest code.
    restructure patches 0002 and 0003 to fix compile issue in patch 0002.
    
    Changes in V2:
    rebase to latest code.
    fix compile error in rte_ethdev.c when debug disabled.
    remove intel copyright from bnx2x, cxgbe, enic, mlx4, mpipe and null PMD's.
    
    Bernard Iremonger (17):
      librte_eal: add RTE_KDRV_NONE for vdevs
      librte_ether: add fields from rte_pci_driver to rte_eth_dev_data
      librte_ether: add function rte_eth_copy_dev_info()
      null: remove pci device driver
      ring: remove pci device driver
      bonding: remove pci device driver
      pcap: remove pci device driver
      ixgbe: copy pci device info to eth_dev data
      e1000: copy pci device info to eth_dev data
      i40e: copy pci device info to eth_dev data
      fm10k: copy pci device info to eth_dev data
      bnx2x: copy pci device info to eth_dev data
      cxgbe: copy pci device info to eth_dev data
      enic: copy pci device info to eth_dev data
      mlx4: copy pci device info to eth_dev data
      virtio: copy pci device info to eth_dev data
      vmxnet3: copy pci device info to eth_dev data
    
    David Hunt (3):
      af_packet: remove pci device driver
      xenvirt: remove pci device driver
      mpipe: remove pci device driver
    
     drivers/net/af_packet/rte_eth_af_packet.c  | 20 +++++------
     drivers/net/bnx2x/bnx2x_ethdev.c           |  3 ++
     drivers/net/bonding/rte_eth_bond_alb.c     |  2 +-
     drivers/net/bonding/rte_eth_bond_api.c     | 58 +++++++++---------------------
     drivers/net/bonding/rte_eth_bond_pmd.c     | 16 ++++-----
     drivers/net/bonding/rte_eth_bond_private.h |  2 +-
     drivers/net/cxgbe/cxgbe_ethdev.c           |  3 ++
     drivers/net/e1000/em_ethdev.c              |  3 ++
     drivers/net/e1000/igb_ethdev.c             |  5 +++
     drivers/net/enic/enic_ethdev.c             |  1 +
     drivers/net/fm10k/fm10k_ethdev.c           |  2 ++
     drivers/net/i40e/i40e_ethdev.c             |  3 ++
     drivers/net/i40e/i40e_ethdev_vf.c          |  2 ++
     drivers/net/ixgbe/ixgbe_ethdev.c           |  4 +++
     drivers/net/mlx4/mlx4.c                    |  3 ++
     drivers/net/mpipe/mpipe_tilegx.c           |  9 +++--
     drivers/net/null/rte_eth_null.c            | 28 ++++-----------
     drivers/net/pcap/rte_eth_pcap.c            | 31 +++++-----------
     drivers/net/ring/rte_eth_ring.c            | 37 +++++--------------
     drivers/net/virtio/virtio_ethdev.c         |  3 ++
     drivers/net/vmxnet3/vmxnet3_ethdev.c       |  2 ++
     drivers/net/xenvirt/rte_eth_xenvirt.c      | 14 +++-----
     lib/librte_eal/common/include/rte_pci.h    |  3 +-
     lib/librte_ether/rte_ethdev.c              | 54 ++++++++++++++++------------
     lib/librte_ether/rte_ethdev.h              | 29 +++++++++++++++
     lib/librte_ether/rte_ether_version.map     |  7 ++++
     26 files changed, 172 insertions(+), 172 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH 1/2] virtio: fixed segmentation fault in queue_release
           [not found] <PATCH>
                       ` (34 preceding siblings ...)
      2015-10-12 16:25 ` [PATCH v3 00/20] remove pci driver from vdevs Bernard Iremonger
    @ 2015-10-20 15:37 ` Bernard Iremonger
      2015-10-20 15:37   ` [PATCH 2/2] rel_notes: update for fix for virtio segmentation fault Bernard Iremonger
      2015-10-20 18:44   ` [PATCH 1/2] virtio: fixed segmentation fault in queue_release Stephen Hemminger
      2015-11-06 16:30 ` [PATCH 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info Bernard Iremonger
                       ` (6 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-10-20 15:37 UTC (permalink / raw)
      To: dev
    
    if input parameter vq is NULL, hw = vq->hw, causes a segmentation fault.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/virtio/virtio_ethdev.c | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
    index 465d3cd..147aca1 100644
    --- a/drivers/net/virtio/virtio_ethdev.c
    +++ b/drivers/net/virtio/virtio_ethdev.c
    @@ -239,9 +239,10 @@ virtio_set_multiple_queues(struct rte_eth_dev *dev, uint16_t nb_queues)
     
     void
     virtio_dev_queue_release(struct virtqueue *vq) {
    -	struct virtio_hw *hw = vq->hw;
    +	struct virtio_hw *hw;
     
     	if (vq) {
    +		hw = vq->hw;
     		/* Select and deactivate the queue */
     		VIRTIO_WRITE_REG_2(hw, VIRTIO_PCI_QUEUE_SEL, vq->queue_id);
     		VIRTIO_WRITE_REG_4(hw, VIRTIO_PCI_QUEUE_PFN, 0);
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info
           [not found] <PATCH>
                       ` (35 preceding siblings ...)
      2015-10-20 15:37 ` [PATCH 1/2] virtio: fixed segmentation fault in queue_release Bernard Iremonger
    @ 2015-11-06 16:30 ` Bernard Iremonger
      2015-11-06 16:39   ` Thomas Monjalon
      2015-11-06 17:20 ` [v2 0/1] librte_ether: fix coverity errors Bernard Iremonger
                       ` (5 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-11-06 16:30 UTC (permalink / raw)
      To: dev
    
    add else branch to if statement.
    
    Dereferencing NULL pointer reported by Coverity, CID 119256.
    Dereferencing NULL pointer reported by Coverity, CID 119257.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     lib/librte_ether/rte_ethdev.c | 23 ++++++++++++-----------
     1 file changed, 12 insertions(+), 11 deletions(-)
    
    diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
    index e0e1dca..8ea1f31 100644
    --- a/lib/librte_ether/rte_ethdev.c
    +++ b/lib/librte_ether/rte_ethdev.c
    @@ -3271,20 +3271,21 @@ rte_eth_dev_get_dcb_info(uint8_t port_id,
     }
     
     void
    -rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, struct rte_pci_device *pci_dev)
    +rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
    +		struct rte_pci_device *pci_dev)
     {
     	if ((eth_dev == NULL) || (pci_dev == NULL)) {
     		PMD_DEBUG_TRACE("NULL pointer eth_dev=%p pci_dev=%p\n",
     				eth_dev, pci_dev);
    -	}
    -
    -	eth_dev->data->dev_flags = 0;
    -	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
    -		eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
    -	if (pci_dev->driver->drv_flags & RTE_PCI_DRV_DETACHABLE)
    -		eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
    +	} else {
    +		eth_dev->data->dev_flags = 0;
    +		if (pci_dev->driver->drv_flags & RTE_PCI_DRV_INTR_LSC)
    +			eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
    +		if (pci_dev->driver->drv_flags & RTE_PCI_DRV_DETACHABLE)
    +			eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
     
    -	eth_dev->data->kdrv = pci_dev->kdrv;
    -	eth_dev->data->numa_node = pci_dev->numa_node;
    -	eth_dev->data->drv_name = pci_dev->driver->name;
    +		eth_dev->data->kdrv = pci_dev->kdrv;
    +		eth_dev->data->numa_node = pci_dev->numa_node;
    +		eth_dev->data->drv_name = pci_dev->driver->name;
    +	}
     }
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [v2 0/1] librte_ether: fix coverity errors
           [not found] <PATCH>
                       ` (36 preceding siblings ...)
      2015-11-06 16:30 ` [PATCH 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info Bernard Iremonger
    @ 2015-11-06 17:20 ` Bernard Iremonger
      2015-11-06 17:20   ` [v2 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info Bernard Iremonger
      2015-11-23 15:20 ` [PATCH 1/1] app/test: create ring and ethdevs in pmd_ring_autotest Bernard Iremonger
                       ` (4 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-11-06 17:20 UTC (permalink / raw)
      To: dev
    
    Changes in v2:
    Add return statement to if branch instead of an else branch.
    
    Bernard Iremonger (1):
      librte_ether: fix coverity errors in rte_eth_copy_pci_info
    
     lib/librte_ether/rte_ethdev.c | 1 +
     1 file changed, 1 insertion(+)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH 1/1] app/test: create ring and ethdevs in pmd_ring_autotest
           [not found] <PATCH>
                       ` (37 preceding siblings ...)
      2015-11-06 17:20 ` [v2 0/1] librte_ether: fix coverity errors Bernard Iremonger
    @ 2015-11-23 15:20 ` Bernard Iremonger
      2015-11-24 16:14   ` Bruce Richardson
      2015-11-24 17:33 ` [PATCH v2 0/2] ring pmd autotest Bernard Iremonger
                       ` (3 subsequent siblings)
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-11-23 15:20 UTC (permalink / raw)
      To: dev
    
    Use command line option --vdev=eth_ring0 to create port 0.
    Create two rings and five ethdevs in test_pmd_ring for ports 1 to 5.
    Improve test output by adding the port number to printf statements,
    and adding a printf describing each test.
    
    revise ring-based PMD doc to match latest ring PMD code.
    
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     app/test/test_pmd_ring.c      | 360 +++++++++++++++++++++++++-----------------
     doc/guides/nics/pcap_ring.rst |  28 ++--
     2 files changed, 235 insertions(+), 153 deletions(-)
    
    diff --git a/app/test/test_pmd_ring.c b/app/test/test_pmd_ring.c
    index a555db8..5568759 100644
    --- a/app/test/test_pmd_ring.c
    +++ b/app/test/test_pmd_ring.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
    @@ -38,108 +38,104 @@
     #include <rte_ethdev.h>
     
     static struct rte_mempool *mp;
    +static int tx_porta, rx_portb, rxtx_portc, rxtx_portd, rxtx_porte;
     
    -#define TX_PORT 0
    -#define RX_PORT 1
    -#define RXTX_PORT 2
    -#define RXTX_PORT2 3
    -#define RXTX_PORT3 4
     #define SOCKET0 0
    -
     #define RING_SIZE 256
    +#define NUM_RINGS 2
    +#define NB_MBUF 512
     
    -#define NB_MBUF   512
     
     static int
    -test_ethdev_configure(void)
    +test_ethdev_configure_port(int port)
     {
     	struct rte_eth_conf null_conf;
     	struct rte_eth_link link;
     
     	memset(&null_conf, 0, sizeof(struct rte_eth_conf));
     
    -	if ((TX_PORT >= RTE_MAX_ETHPORTS) || (RX_PORT >= RTE_MAX_ETHPORTS)\
    -		|| (RXTX_PORT >= RTE_MAX_ETHPORTS)) {
    -		printf(" TX/RX port exceed max eth ports\n");
    -		return -1;
    -	}
    -	if (rte_eth_dev_configure(TX_PORT, 1, 2, &null_conf) < 0) {
    -		printf("Configure failed for TX port\n");
    +	if (rte_eth_dev_configure(port, 1, 2, &null_conf) < 0) {
    +		printf("Configure failed for port %d\n", port);
     		return -1;
     	}
     
     	/* Test queue release */
    -	if (rte_eth_dev_configure(TX_PORT, 1, 1, &null_conf) < 0) {
    -		printf("Configure failed for TX port\n");
    -		return -1;
    -	}
    -	if (rte_eth_dev_configure(RX_PORT, 1, 1, &null_conf) < 0) {
    -		printf("Configure failed for RX port\n");
    -		return -1;
    -	}
    -	if (rte_eth_dev_configure(RXTX_PORT, 1, 1, &null_conf) < 0) {
    -		printf("Configure failed for RXTX port\n");
    +	if (rte_eth_dev_configure(port, 1, 1, &null_conf) < 0) {
    +		printf("Configure failed for port %d\n", port);
     		return -1;
     	}
     
    -	if (rte_eth_tx_queue_setup(TX_PORT, 0, RING_SIZE, SOCKET0, NULL) < 0) {
    -		printf("TX queue setup failed\n");
    -		return -1;
    -	}
    -	if (rte_eth_rx_queue_setup(RX_PORT, 0, RING_SIZE, SOCKET0,
    -			NULL, mp) < 0) {
    -		printf("RX queue setup failed\n");
    -		return -1;
    -	}
    -	if (rte_eth_tx_queue_setup(RXTX_PORT, 0, RING_SIZE, SOCKET0, NULL) < 0) {
    -		printf("TX queue setup failed\n");
    +	if (rte_eth_tx_queue_setup(port, 0, RING_SIZE, SOCKET0, NULL) < 0) {
    +		printf("TX queue setup failed port %d\n", port);
     		return -1;
     	}
    -	if (rte_eth_rx_queue_setup(RXTX_PORT, 0, RING_SIZE, SOCKET0,
    +
    +	if (rte_eth_rx_queue_setup(port, 0, RING_SIZE, SOCKET0,
     			NULL, mp) < 0) {
    -		printf("RX queue setup failed\n");
    +		printf("RX queue setup failed port %d\n", port);
     		return -1;
     	}
     
    -	if (rte_eth_dev_start(TX_PORT) < 0) {
    -		printf("Error starting TX port\n");
    +	if (rte_eth_dev_start(port) < 0) {
    +		printf("Error starting port %d\n", port);
     		return -1;
     	}
    -	if (rte_eth_dev_start(RX_PORT) < 0) {
    -		printf("Error starting RX port\n");
    +
    +	rte_eth_link_get(port, &link);
    +
    +	return 0;
    +}
    +
    +static int
    +test_send_basic_packets(void)
    +{
    +	struct rte_mbuf  bufs[RING_SIZE];
    +	struct rte_mbuf *pbufs[RING_SIZE];
    +	int i;
    +
    +	printf("Testing send and receive RING_SIZE/2 packets (tx_porta -> rx_portb)\n");
    +
    +	for (i = 0; i < RING_SIZE/2; i++)
    +		pbufs[i] = &bufs[i];
    +
    +	if (rte_eth_tx_burst(tx_porta, 0, pbufs, RING_SIZE/2) < RING_SIZE/2) {
    +		printf("Failed to transmit packet burst port %d\n", tx_porta);
     		return -1;
     	}
    -	if (rte_eth_dev_start(RXTX_PORT) < 0) {
    -		printf("Error starting RX port\n");
    +
    +	if (rte_eth_rx_burst(rx_portb, 0, pbufs, RING_SIZE) != RING_SIZE/2) {
    +		printf("Failed to receive packet burst on port %d\n", rx_portb);
     		return -1;
     	}
     
    -	rte_eth_link_get(TX_PORT, &link);
    -	rte_eth_link_get(RX_PORT, &link);
    -	rte_eth_link_get(RXTX_PORT, &link);
    +	for (i = 0; i < RING_SIZE/2; i++)
    +		if (pbufs[i] != &bufs[i]) {
    +			printf("Error: received data does not match that transmitted\n");
    +			return -1;
    +		}
     
     	return 0;
     }
     
     static int
    -test_send_basic_packets(void)
    +test_send_basic_packets_port(int port)
     {
     	struct rte_mbuf  bufs[RING_SIZE];
     	struct rte_mbuf *pbufs[RING_SIZE];
     	int i;
     
    -	printf("Testing ring pmd RX/TX\n");
    +	printf("Testing send and receive RING_SIZE/2 packets (cmdl_port0 -> cmdl_port0)\n");
     
     	for (i = 0; i < RING_SIZE/2; i++)
     		pbufs[i] = &bufs[i];
     
    -	if (rte_eth_tx_burst(TX_PORT, 0, pbufs, RING_SIZE/2) < RING_SIZE/2) {
    -		printf("Failed to transmit packet burst\n");
    +	if (rte_eth_tx_burst(port, 0, pbufs, RING_SIZE/2) < RING_SIZE/2) {
    +		printf("Failed to transmit packet burst port %d\n", port);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RX_PORT, 0, pbufs, RING_SIZE) != RING_SIZE/2) {
    -		printf("Failed to receive packet burst\n");
    +	if (rte_eth_rx_burst(port, 0, pbufs, RING_SIZE) != RING_SIZE/2) {
    +		printf("Failed to receive packet burst on port %d\n", port);
     		return -1;
     	}
     
    @@ -152,89 +148,92 @@ test_send_basic_packets(void)
     	return 0;
     }
     
    +
     static int
    -test_get_stats(void)
    +test_get_stats(int port)
     {
     	struct rte_eth_stats stats;
     	struct rte_mbuf buf, *pbuf = &buf;
     
    -	printf("Testing ring PMD stats\n");
    +	printf("Testing ring PMD stats_get port %d\n", port);
     
     	/* check stats of RXTX port, should all be zero */
    -	rte_eth_stats_get(RXTX_PORT, &stats);
    +
    +	rte_eth_stats_get(port, &stats);
     	if (stats.ipackets != 0 || stats.opackets != 0 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not zero\n");
    +		printf("Error: port %d stats are not zero\n", port);
     		return -1;
     	}
     
     	/* send and receive 1 packet and check for stats update */
    -	if (rte_eth_tx_burst(RXTX_PORT, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	if (rte_eth_tx_burst(port, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", port);
     		return -1;
     	}
    -	if (rte_eth_rx_burst(RXTX_PORT, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +
    +	if (rte_eth_rx_burst(port, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", port);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT, &stats);
    +	rte_eth_stats_get(port, &stats);
     	if (stats.ipackets != 1 || stats.opackets != 1 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", port);
     		return -1;
     	}
     	return 0;
     }
     
     static int
    -test_stats_reset(void)
    +test_stats_reset(int port)
     {
     	struct rte_eth_stats stats;
     	struct rte_mbuf buf, *pbuf = &buf;
     
    -	printf("Testing ring PMD stats reset\n");
    +	printf("Testing ring PMD stats_reset port %d\n", port);
     
    -	rte_eth_stats_reset(RXTX_PORT);
    +	rte_eth_stats_reset(port);
     
     	/* check stats of RXTX port, should all be zero */
    -	rte_eth_stats_get(RXTX_PORT, &stats);
    +	rte_eth_stats_get(port, &stats);
     	if (stats.ipackets != 0 || stats.opackets != 0 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not zero\n");
    +		printf("Error: port %d stats are not zero\n", port);
     		return -1;
     	}
     
     	/* send and receive 1 packet and check for stats update */
    -	if (rte_eth_tx_burst(RXTX_PORT, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	if (rte_eth_tx_burst(port, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", port);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RXTX_PORT, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +	if (rte_eth_rx_burst(port, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", port);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT, &stats);
    +	rte_eth_stats_get(port, &stats);
     	if (stats.ipackets != 1 || stats.opackets != 1 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", port);
     		return -1;
     	}
     
    -	rte_eth_stats_reset(RXTX_PORT);
    +	rte_eth_stats_reset(port);
     
     	/* check stats of RXTX port, should all be zero */
    -	rte_eth_stats_get(RXTX_PORT, &stats);
    +	rte_eth_stats_get(port, &stats);
     	if (stats.ipackets != 0 || stats.opackets != 0 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not zero\n");
    +		printf("Error: port %d stats are not zero\n", port);
     		return -1;
     	}
     
    @@ -242,162 +241,182 @@ test_stats_reset(void)
     }
     
     static int
    -test_pmd_ring_pair_create_attach(void)
    +test_pmd_ring_pair_create_attach(int portd, int porte)
     {
     	struct rte_eth_stats stats, stats2;
     	struct rte_mbuf buf, *pbuf = &buf;
     	struct rte_eth_conf null_conf;
     
    -	if ((RXTX_PORT2 >= RTE_MAX_ETHPORTS) || (RXTX_PORT3 >= RTE_MAX_ETHPORTS)) {
    -		printf(" TX/RX port exceed max eth ports\n");
    -		return -1;
    -	}
    -	if ((rte_eth_dev_configure(RXTX_PORT2, 1, 1, &null_conf) < 0)
    -		|| (rte_eth_dev_configure(RXTX_PORT3, 1, 1, &null_conf) < 0)) {
    -		printf("Configure failed for RXTX port\n");
    +	if ((rte_eth_dev_configure(portd, 1, 1, &null_conf) < 0)
    +		|| (rte_eth_dev_configure(porte, 1, 1, &null_conf) < 0)) {
    +		printf("Configure failed for port\n");
     		return -1;
     	}
     
    -	if ((rte_eth_tx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, NULL) < 0)
    -		|| (rte_eth_tx_queue_setup(RXTX_PORT3, 0, RING_SIZE, SOCKET0, NULL) < 0)) {
    +	if ((rte_eth_tx_queue_setup(portd, 0, RING_SIZE, SOCKET0, NULL) < 0)
    +		|| (rte_eth_tx_queue_setup(porte, 0, RING_SIZE, SOCKET0, NULL) < 0)) {
     		printf("TX queue setup failed\n");
     		return -1;
     	}
     
    -	if ((rte_eth_rx_queue_setup(RXTX_PORT2, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
    -		|| (rte_eth_rx_queue_setup(RXTX_PORT3, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) {
    +	if ((rte_eth_rx_queue_setup(portd, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)
    +		|| (rte_eth_rx_queue_setup(porte, 0, RING_SIZE, SOCKET0, NULL, mp) < 0)) {
     		printf("RX queue setup failed\n");
     		return -1;
     	}
     
    -	if ((rte_eth_dev_start(RXTX_PORT2) < 0)
    -		|| (rte_eth_dev_start(RXTX_PORT3) < 0)) {
    -		printf("Error starting RXTX port\n");
    +	if ((rte_eth_dev_start(portd) < 0)
    +		|| (rte_eth_dev_start(porte) < 0)) {
    +		printf("Error starting port\n");
    +		return -1;
    +	}
    +
    +	rte_eth_stats_reset(portd);
    +	/* check stats of port, should all be zero */
    +	rte_eth_stats_get(portd, &stats);
    +	if (stats.ipackets != 0 || stats.opackets != 0 ||
    +			stats.ibytes != 0 || stats.obytes != 0 ||
    +			stats.ierrors != 0 || stats.oerrors != 0) {
    +		printf("Error: port %d stats are not zero\n", portd);
    +		return -1;
    +	}
    +
    +	rte_eth_stats_reset(porte);
    +	/* check stats of port, should all be zero */
    +	rte_eth_stats_get(porte, &stats2);
    +	if (stats2.ipackets != 0 || stats2.opackets != 0 ||
    +			stats2.ibytes != 0 || stats2.obytes != 0 ||
    +			stats2.ierrors != 0 || stats2.oerrors != 0) {
    +		printf("Error: port %d stats are not zero\n", porte);
     		return -1;
     	}
     
     	/*
    -	 * send and receive 1 packet (RXTX_PORT2 -> RXTX_PORT3)
    +	 * send and receive 1 packet (portd -> porte)
     	 * and check for stats update
     	 */
    -	if (rte_eth_tx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	printf("Testing send and receive 1 packet (portd -> porte)\n");
    +	if (rte_eth_tx_burst(portd, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", portd);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +	if (rte_eth_rx_burst(porte, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", porte);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT2, &stats);
    -	rte_eth_stats_get(RXTX_PORT3, &stats2);
    +	rte_eth_stats_get(portd, &stats);
    +	rte_eth_stats_get(porte, &stats2);
     	if (stats.ipackets != 0 || stats.opackets != 1 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", portd);
     		return -1;
     	}
     
     	if (stats2.ipackets != 1 || stats2.opackets != 0 ||
     			stats2.ibytes != 0 || stats2.obytes != 0 ||
     			stats2.ierrors != 0 || stats2.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", porte);
     		return -1;
     	}
     
     	/*
    -	 * send and receive 1 packet (RXTX_PORT3 -> RXTX_PORT2)
    +	 * send and receive 1 packet (porte -> portd)
     	 * and check for stats update
     	 */
    -	if (rte_eth_tx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	printf("Testing send and receive 1 packet (porte -> portd)\n");
    +	if (rte_eth_tx_burst(porte, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", porte);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +	if (rte_eth_rx_burst(portd, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", portd);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT2, &stats);
    -	rte_eth_stats_get(RXTX_PORT3, &stats2);
    +	rte_eth_stats_get(portd, &stats);
    +	rte_eth_stats_get(porte, &stats2);
     	if (stats.ipackets != 1 || stats.opackets != 1 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", portd);
     		return -1;
     	}
     
     	if (stats2.ipackets != 1 || stats2.opackets != 1 ||
     			stats2.ibytes != 0 || stats2.obytes != 0 ||
     			stats2.ierrors != 0 || stats2.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", porte);
     		return -1;
     	}
     
     	/*
    -	 * send and receive 1 packet (RXTX_PORT2 -> RXTX_PORT2)
    +	 * send and receive 1 packet (portd -> portd)
     	 * and check for stats update
     	 */
    -	if (rte_eth_tx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	printf("Testing send and receive 1 packet (portd -> portd)\n");
    +	if (rte_eth_tx_burst(portd, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", portd);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RXTX_PORT2, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +	if (rte_eth_rx_burst(portd, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", porte);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT2, &stats);
    -	rte_eth_stats_get(RXTX_PORT3, &stats2);
    +	rte_eth_stats_get(portd, &stats);
    +	rte_eth_stats_get(porte, &stats2);
     	if (stats.ipackets != 2 || stats.opackets != 2 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", portd);
     		return -1;
     	}
     
     	if (stats2.ipackets != 1 || stats2.opackets != 1 ||
     			stats2.ibytes != 0 || stats2.obytes != 0 ||
     			stats2.ierrors != 0 || stats2.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", porte);
     		return -1;
     	}
     
     	/*
    -	 * send and receive 1 packet (RXTX_PORT3 -> RXTX_PORT3)
    +	 * send and receive 1 packet (porte -> porte)
     	 * and check for stats update
     	 */
    -	if (rte_eth_tx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) {
    -		printf("Error sending packet to RXTX port\n");
    +	printf("Testing send and receive 1 packet (porte -> porte)\n");
    +	if (rte_eth_tx_burst(porte, 0, &pbuf, 1) != 1) {
    +		printf("Error sending packet to port %d\n", porte);
     		return -1;
     	}
     
    -	if (rte_eth_rx_burst(RXTX_PORT3, 0, &pbuf, 1) != 1) {
    -		printf("Error receiving packet from RXTX port\n");
    +	if (rte_eth_rx_burst(porte, 0, &pbuf, 1) != 1) {
    +		printf("Error receiving packet from port %d\n", porte);
     		return -1;
     	}
     
    -	rte_eth_stats_get(RXTX_PORT2, &stats);
    -	rte_eth_stats_get(RXTX_PORT3, &stats2);
    +	rte_eth_stats_get(portd, &stats);
    +	rte_eth_stats_get(porte, &stats2);
     	if (stats.ipackets != 2 || stats.opackets != 2 ||
     			stats.ibytes != 0 || stats.obytes != 0 ||
     			stats.ierrors != 0 || stats.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", portd);
     		return -1;
     	}
     
     	if (stats2.ipackets != 2 || stats2.opackets != 2 ||
     			stats2.ibytes != 0 || stats2.obytes != 0 ||
     			stats2.ierrors != 0 || stats2.oerrors != 0) {
    -		printf("Error: RXTX port stats are not as expected\n");
    +		printf("Error: port %d stats are not as expected\n", porte);
     		return -1;
     	}
     
    -	rte_eth_dev_stop(RXTX_PORT2);
    -	rte_eth_dev_stop(RXTX_PORT3);
    +	rte_eth_dev_stop(portd);
    +	rte_eth_dev_stop(porte);
     
     	return 0;
     }
    @@ -405,36 +424,95 @@ test_pmd_ring_pair_create_attach(void)
     static int
     test_pmd_ring(void)
     {
    +	struct rte_ring *rxtx[NUM_RINGS];
    +	int cmdl_port0 = 0;
    +	uint8_t nb_ports;
    +
    +	nb_ports = rte_eth_dev_count();
    +	printf("nb_ports=%d\n", (int)nb_ports);
    +
    +	/*  create the rings and eth_rings in the test code.
    +	 *  This does not test the rte_pmd_ring_devinit function.
    +	 *
    +	 *  Test with the command line option --vdev=eth_ring0 to test rte_pmd_ring_devinit.
    +	 */
    +	rxtx[0] = rte_ring_create("R0", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
    +	if (rxtx[0] == NULL) {
    +		printf("rte_ring_create R0 failed");
    +		return -1;
    +	}
    +
    +	rxtx[1] = rte_ring_create("R1", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
    +	if (rxtx[1] == NULL) {
    +		printf("rte_ring_create R1 failed");
    +		return -1;
    +	}
    +
    +	tx_porta = rte_eth_from_rings("eth_ringa", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
    +	rx_portb = rte_eth_from_rings("eth_ringb", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
    +	rxtx_portc = rte_eth_from_rings("eth_ringc", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
    +	rxtx_portd = rte_eth_from_rings("eth_ringd", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
    +	rxtx_porte = rte_eth_from_rings("eth_ringe", rxtx, NUM_RINGS, rxtx, NUM_RINGS, SOCKET0);
    +
    +	printf("tx_porta=%d rx_portb=%d rxtx_portc=%d rxtx_portd=%d rxtx_porte=%d\n",
    +			tx_porta, rx_portb, rxtx_portc, rxtx_portd, rxtx_porte);
    +
    +	if ((tx_porta == -1) || (rx_portb == -1) || (rxtx_portc == -1)
    +		|| (rxtx_portd == -1) || (rxtx_porte == -1)) {
    +		printf("rte_eth_from rings failed\n");
    +		return -1;
    +	}
    +
     	mp = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32,
     		0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
     	if (mp == NULL)
     		return -1;
     
    -	if ((TX_PORT >= RTE_MAX_ETHPORTS) || (RX_PORT >= RTE_MAX_ETHPORTS)\
    -		|| (RXTX_PORT >= RTE_MAX_ETHPORTS)) {
    -		printf(" TX/RX port exceed max eth ports\n");
    +	if ((tx_porta >= RTE_MAX_ETHPORTS) || (rx_portb >= RTE_MAX_ETHPORTS)
    +		|| (rxtx_portc >= RTE_MAX_ETHPORTS)
    +		|| (rxtx_portd >= RTE_MAX_ETHPORTS)
    +		|| (rxtx_porte >= RTE_MAX_ETHPORTS)) {
    +		printf(" port exceed max eth ports\n");
     		return -1;
     	}
     
    -	if (test_ethdev_configure() < 0)
    +	if (test_ethdev_configure_port(tx_porta) < 0)
    +		return -1;
    +
    +	if (test_ethdev_configure_port(rx_portb) < 0)
    +		return -1;
    +
    +	if (test_ethdev_configure_port(rxtx_portc) < 0)
     		return -1;
     
     	if (test_send_basic_packets() < 0)
     		return -1;
     
    -	if (test_get_stats() < 0)
    +	if (test_get_stats(rxtx_portc) < 0)
     		return -1;
     
    -	if (test_stats_reset() < 0)
    +	if (test_stats_reset(rxtx_portc) < 0)
     		return -1;
     
    -	rte_eth_dev_stop(RX_PORT);
    -	rte_eth_dev_stop(TX_PORT);
    -	rte_eth_dev_stop(RXTX_PORT);
    +	rte_eth_dev_stop(tx_porta);
    +	rte_eth_dev_stop(rx_portb);
    +	rte_eth_dev_stop(rxtx_portc);
     
    -	if (test_pmd_ring_pair_create_attach() < 0)
    +	if (test_pmd_ring_pair_create_attach(rxtx_portd, rxtx_porte) < 0)
     		return -1;
     
    +	if (nb_ports > 0) {
    +		/* test port 0 created with the --vdev=eth_ring0 command line option */
    +		if (test_ethdev_configure_port(cmdl_port0) < 0)
    +			return -1;
    +		if (test_send_basic_packets_port(cmdl_port0) < 0)
    +			return -1;
    +		if (test_stats_reset(cmdl_port0) < 0)
    +			return -1;
    +		if (test_get_stats(cmdl_port0) < 0)
    +			return -1;
    +		rte_eth_dev_stop(cmdl_port0);
    +	}
     	return 0;
     }
     
    diff --git a/doc/guides/nics/pcap_ring.rst b/doc/guides/nics/pcap_ring.rst
    index 5d65dc6..46aa3ac 100644
    --- a/doc/guides/nics/pcap_ring.rst
    +++ b/doc/guides/nics/pcap_ring.rst
    @@ -1,5 +1,5 @@
     ..  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
    @@ -217,7 +217,7 @@ Using the Poll Mode Driver from an Application
     Both drivers can provide similar APIs to allow the user to create a PMD, that is,
     rte_ethdev structure, instances at run-time in the end-application,
     for example, using rte_eth_from_rings() or rte_eth_from_pcaps() APIs.
    -For the rings- based PMD, this functionality could be used, for example,
    +For the rings-based PMD, this functionality could be used, for example,
     to allow data exchange between cores using rings to be done in exactly the
     same way as sending or receiving packets from an Ethernet device.
     For the libpcap-based PMD, it allows an application to open one or more pcap files
    @@ -231,26 +231,30 @@ for reception on the same port (error handling omitted for clarity):
     
     .. code-block:: c
     
    -    struct rte_ring *r1, *r2;
    -    int port1, port2;
    +    #define RING_SIZE 256
    +    #define NUM_RINGS 2
    +    #define SOCKET0 0
     
    -    r1 = rte_ring_create("R1", 256, SOCKET0,RING_F_SP_ENQ|RING_F_SC_DEQ);
    -    r2 = rte_ring_create("R2", 256, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
    +    struct rte_ring *ring[NUM_RINGS];
    +    int port0, port1;
     
    -    /* create an ethdev where RX and TX are done to/from r1, and * another from r2 */
    +    ring[0] = rte_ring_create("R0", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
    +    ring[1] = rte_ring_create("R1", RING_SIZE, SOCKET0, RING_F_SP_ENQ|RING_F_SC_DEQ);
     
    -    port1 = rte_eth_from_rings(r1, 1, r1, 1, SOCKET0);
    -    port2 = rte_eth_from_rings(r2, 1, r2, 1, SOCKET0);
    +    /* create two ethdev's */
    +
    +    port0 = rte_eth_from_rings("eth_ring0", ring, NUM_RINGS, ring, NUM_RINGS, SOCKET0);
    +    port1 = rte_eth_from_rings("eth_ring1", ring, NUM_RINGS, ring, NUM_RINGS, SOCKET0);
     
     
     To create two pseudo-Ethernet ports where the traffic is switched between them,
    -that is, traffic sent to port 1 is read back from port 2 and vice-versa,
    +that is, traffic sent to port 0 is read back from port 1 and vice-versa,
     the final two lines could be changed as below:
     
     .. code-block:: c
     
    -    port1 = rte_eth_from_rings(r1, 1, r2, 1, SOCKET0);
    -    port2 = rte_eth_from_rings(r2, 1, r1, 1, SOCKET0);
    +    port0 = rte_eth_from_rings("eth_ring0", &ring[0], 1, &ring[1], 1, SOCKET0);
    +    port1 = rte_eth_from_rings("eth_ring1", &ring[1], 1, &ring[0], 1, SOCKET0);
     
     This type of configuration could be useful in a pipeline model, for example,
     where one may want to have inter-core communication using pseudo Ethernet devices rather than raw rings,
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH v2 0/2] ring pmd autotest
           [not found] <PATCH>
                       ` (38 preceding siblings ...)
      2015-11-23 15:20 ` [PATCH 1/1] app/test: create ring and ethdevs in pmd_ring_autotest Bernard Iremonger
    @ 2015-11-24 17:33 ` Bernard Iremonger
      2015-11-24 17:33   ` [PATCH v2 1/2] app/test: create ring and ethdevs in pmd_ring_autotest Bernard Iremonger
      2015-11-24 17:33   ` [PATCH v2 2/2] doc: revise ring-based PMD to match latest ring PMD code Bernard Iremonger
      2015-11-27 16:07 ` [PATCH v3 0/2] ring pmd autotest Bernard Iremonger
                       ` (2 subsequent siblings)
      42 siblings, 2 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-11-24 17:33 UTC (permalink / raw)
      To: dev
    
    Changes in v2:
    move doc changes to a seperate patch.
    
    
    Bernard Iremonger (2):
      app/test: create ring and ethdevs in pmd_ring_autotest
      doc: revise ring-based PMD to match latest ring PMD code
    
     app/test/test_pmd_ring.c      | 360 +++++++++++++++++++++++++-----------------
     doc/guides/nics/pcap_ring.rst |  28 ++--
     2 files changed, 235 insertions(+), 153 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH v3 0/2] ring pmd autotest
           [not found] <PATCH>
                       ` (39 preceding siblings ...)
      2015-11-24 17:33 ` [PATCH v2 0/2] ring pmd autotest Bernard Iremonger
    @ 2015-11-27 16:07 ` Bernard Iremonger
      2015-11-27 16:07   ` [PATCH v3 1/2] app/test: fix failures in the ring_pmd_autotest program Bernard Iremonger
                         ` (2 more replies)
      2015-12-04 14:05 ` [PATCH] bonding: use eth_dev link state interrupt flag Bernard Iremonger
      2015-12-04 15:14 ` [PATCH 1/1] virtio: call rte_eth_copy_pci_info() later Bernard Iremonger
      42 siblings, 3 replies; 275+ messages in thread
    From: Bernard Iremonger @ 2015-11-27 16:07 UTC (permalink / raw)
      To: dev
    
    Fix failures in the ring_pmd_autotest program.
    Correct errors in the ring PMD documentation.
    
    Changes in v3:
    rebase to latest code.
    revicse commit messages.
    
    Changes in v2:
    move doc changes to a seperate patch.
    
    Bernard Iremonger (2):
      app/test: fix failures in the ring_pmd_autotest program
      doc: correct Rings-based PMD section in the NIC Drivers guides
    
     app/test/test_pmd_ring.c      | 360 +++++++++++++++++++++++++-----------------
     doc/guides/nics/pcap_ring.rst |  28 ++--
     2 files changed, 235 insertions(+), 153 deletions(-)
    
    -- 
    1.9.1
    
    ^ permalink raw reply	[flat|nested] 275+ messages in thread
  • * [PATCH] bonding: use eth_dev link state interrupt flag
           [not found] <PATCH>
                       ` (40 preceding siblings ...)
      2015-11-27 16:07 ` [PATCH v3 0/2] ring pmd autotest Bernard Iremonger
    @ 2015-12-04 14:05 ` Bernard Iremonger
      2015-12-04 16:45   ` Declan Doherty
      2015-12-04 15:14 ` [PATCH 1/1] virtio: call rte_eth_copy_pci_info() later Bernard Iremonger
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-12-04 14:05 UTC (permalink / raw)
      To: dev
    
    replace RTE_PCI_DRV_INTR_LSC with RTE_ETH_DEV_INTR_LSC
    
    Fixes: 71ba84b1ccb2("bonding: remove fake pci interface")
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
    index aa985f5..8f84ec1 100644
    --- a/drivers/net/bonding/rte_eth_bond_pmd.c
    +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
    @@ -1445,7 +1445,7 @@ slave_add(struct bond_dev_private *internals,
     
     	/* If slave device doesn't support interrupts then we need to enabled
     	 * polling to monitor link status */
    -	if (!(slave_eth_dev->data->dev_flags & RTE_PCI_DRV_INTR_LSC)) {
    +	if (!(slave_eth_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)) {
     		slave_details->link_status_poll_enabled = 1;
     
     		if (!internals->link_status_polling_enabled) {
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread
  • * [PATCH 1/1] virtio: call rte_eth_copy_pci_info() later
           [not found] <PATCH>
                       ` (41 preceding siblings ...)
      2015-12-04 14:05 ` [PATCH] bonding: use eth_dev link state interrupt flag Bernard Iremonger
    @ 2015-12-04 15:14 ` Bernard Iremonger
      2015-12-06 22:37   ` Thomas Monjalon
      42 siblings, 1 reply; 275+ messages in thread
    From: Bernard Iremonger @ 2015-12-04 15:14 UTC (permalink / raw)
      To: dev
    
    call rte_eth_copy_pci_info() after the RTE_PCI_DRV_INTR_LSC
    has been initialised.
    
    Fixes: eeefe73f0af1("drivers: copy PCI device info to ethdev data")
    
    Reported-by: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
    ---
     drivers/net/virtio/virtio_ethdev.c | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
    index 74c00ee..ae7c281 100644
    --- a/drivers/net/virtio/virtio_ethdev.c
    +++ b/drivers/net/virtio/virtio_ethdev.c
    @@ -1289,8 +1289,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
     
     	pci_dev = eth_dev->pci_dev;
     
    -	rte_eth_copy_pci_info(eth_dev, pci_dev);
    -
     	if (virtio_resource_init(pci_dev) < 0)
     		return -1;
     
    @@ -1311,6 +1309,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
     	if (!vtpci_with_feature(hw, VIRTIO_NET_F_STATUS))
     		pci_dev->driver->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;
     
    +	rte_eth_copy_pci_info(eth_dev, pci_dev);
    +
     	rx_func_get(eth_dev);
     
     	/* Setting up rx_header size for the device */
    -- 
    1.9.1
    
    ^ permalink raw reply related	[flat|nested] 275+ messages in thread

  • end of thread, other threads:[~2015-12-07  2:56 UTC | newest]
    
    Thread overview: 275+ messages (download: mbox.gz / follow: Atom feed)
    -- links below jump to the message on this page --
         [not found] <PATCH>
         [not found] ` <1224786829-32405-1-git-send-email-spulijala@amcc.com>
         [not found]   ` <DB599F406D04E34389140B7D99C71B1B064CADB6@SDCEXCHANGE01.ad.amcc.com>
         [not found]     ` <0CA0A16855646F4FA96D25A158E299D6053E62E9@SDCEXCHANGE01.ad.amcc.com>
    2008-10-24 20:54       ` [PATCH 1/1 v7] Add Crypto API User Interface Support Shasi Pulijala
    2008-10-24 21:07         ` Evgeniy Polyakov
    2008-10-24 22:16           ` Loc Ho
    2008-10-25 13:50             ` Evgeniy Polyakov
    2008-10-27 17:04               ` Loc Ho
    2014-12-08 17:18 ` [PATCH] doc: add bsd license to svg file Bernard Iremonger
         [not found]   ` <1418059123-32145-1-git-send-email-bernard.iremonger-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
    2014-12-11 13:42     ` De Lara Guarch, Pablo
    2015-06-10 15:12 ` [PATCH 0/2] doc: kni command line fixes Bernard Iremonger
    2015-06-10 15:12   ` [PATCH 1/2] doc: correct kni command line in virtio chapter Bernard Iremonger
    2015-06-15  2:29     ` Zhang, Helin
    2015-06-10 15:12   ` [PATCH 2/2] doc: fix kni command line in Kernel NIC Interface chapter Bernard Iremonger
    2015-06-15  2:30     ` Zhang, Helin
    2015-06-10 17:13   ` [PATCH 0/2] doc: kni command line fixes Mcnamara, John
    2015-07-27 21:45     ` Thomas Monjalon
    2015-06-11 14:33 ` [PATCH] doc: update port attach and detach in Testpmd Runtime Functions chapter Bernard Iremonger
    2015-06-16  2:45   ` Tetsuya Mukawa
    2015-07-28 10:22     ` Thomas Monjalon
    2015-06-12 16:21 ` [PATCH v3 0/2] bonding PCI Port Hotplug Bernard Iremonger
    2015-06-12 16:21   ` [PATCH v3 1/2] bonding: add support for " Bernard Iremonger
    2015-06-12 16:21   ` [PATCH v3 2/2] test-pmd: modified testpmd for link_bonding Bernard Iremonger
    2015-06-19 16:33   ` [PATCH v3 0/2] bonding PCI Port Hotplug Declan Doherty
    2015-06-16 11:30 ` [PATCH v2 0/2] virtio: " Bernard Iremonger
    2015-06-16 11:30   ` [PATCH v3 1/2] virtio: add support for " Bernard Iremonger
    2015-06-17  1:27     ` Ouyang, Changchun
    2015-06-16 11:30   ` [PATCH v3 2/2] virtio: check vq parameter Bernard Iremonger
    2015-06-17  1:27     ` Ouyang, Changchun
    2015-06-17 11:38 ` [PATCH v4 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
    2015-06-17 11:38   ` [PATCH v4 1/6] i40e: changes to support PCI Port Hotplug Bernard Iremonger
    2015-06-17 11:38   ` [PATCH v4 2/6] i40e: release vmdq vsi's in dev_close Bernard Iremonger
    2015-06-17 11:38   ` [PATCH v4 3/6] i40e: increase ASQ_DELAY_MS to 100 in i40evf_wait_cmd_done() Bernard Iremonger
    2015-06-17 11:39 ` [PATCH v4 4/6] i40e: call _clear_cmd() when error occurs Bernard Iremonger
    2015-06-17 11:39   ` [PATCH v4 5/6] i40e: clear queues in i40evf_dev_stop Bernard Iremonger
    2015-06-17 11:39   ` [PATCH v4 6/6] i40e: check rxq parameter in i40e_reset_rx_queue Bernard Iremonger
    2015-06-18 12:44 ` [PATCH v5] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
    2015-06-19 17:03 ` [PATCH v5 0/6] i40e: PCI Port Hotplug Changes Bernard Iremonger
    2015-06-19 17:03   ` [PATCH v5 1/6] i40e: changes to support PCI Port Hotplug Bernard Iremonger
    2015-06-19 17:03   ` [PATCH v5 2/6] i40e: release vmdq vsi's in dev_close Bernard Iremonger
    2015-06-19 17:03   ` [PATCH v5 3/6] i40e: increase ASQ_DELAY_MS to 100 and MAX_TRY_TIMES to 20 in i40evf_wait_cmd_done() Bernard Iremonger
    2015-06-19 17:04   ` [PATCH v5 4/6] i40e: call _clear_cmd() when error occurs Bernard Iremonger
    2015-06-19 17:04   ` [PATCH v5 5/6] i40e: clear queues in i40evf_dev_stop Bernard Iremonger
    2015-06-19 17:04   ` [PATCH v5 6/6] i40e: check rxq parameter in i40e_reset_rx_queue Bernard Iremonger
    2015-06-25  2:28   ` [PATCH v5 0/6] i40e: PCI Port Hotplug Changes Zhang, Helin
    2015-06-22 10:44 ` [PATCH v6] e1000: igb and em1000 PCI Port Hotplug changes Bernard Iremonger
    2015-06-25  2:33   ` Zhang, Helin
    2015-06-25  9:04     ` Iremonger, Bernard
    2015-06-26  8:56   ` Zhang, Helin
    2015-06-24 15:08 ` [PATCH v5] ixgbe: changes to support PCI Port Hotplug Bernard Iremonger
    2015-06-25 11:41   ` Ananyev, Konstantin
    2015-06-25 14:30 ` [PATCH] librte_ether: release memory in uninit function Bernard Iremonger
    2015-06-25 14:41   ` Stephen Hemminger
    2015-06-25 18:32   ` Ananyev, Konstantin
    2015-06-26  8:17     ` Iremonger, Bernard
    2015-06-26  9:32 ` [PATCH v2] " Bernard Iremonger
    2015-06-26  9:55   ` Ananyev, Konstantin
    2015-06-29  8:54   ` Qiu, Michael
    2015-06-29 10:20     ` Iremonger, Bernard
    2015-06-29 15:22       ` Qiu, Michael
    2015-06-29 16:42         ` Iremonger, Bernard
    2015-06-30  1:31           ` Qiu, Michael
    2015-07-06 11:35             ` Qiu, Michael
    2015-07-07  3:38               ` Tetsuya Mukawa
    2015-07-07 10:53                 ` Iremonger, Bernard
    2015-07-08  3:47                   ` Tetsuya Mukawa
    2015-07-08  9:49                     ` Iremonger, Bernard
    2015-07-08  9:59                       ` Thomas Monjalon
    2015-07-09  3:32                         ` Tetsuya Mukawa
    2015-07-14  5:15                           ` Qiu, Michael
    2015-07-09  5:46                       ` [PATCH] doc: Fix doxygen comments of rte_eth_dev_close() and rte_eth_dev_detach() Tetsuya Mukawa
    2015-07-09  7:28                         ` Thomas Monjalon
    2015-07-09  8:10                           ` Tetsuya Mukawa
    2015-07-09  8:19                       ` [PATCH v2] " Tetsuya Mukawa
    2015-07-10 22:31                         ` Thomas Monjalon
    2015-07-02 14:36 ` [PATCH v6 0/2] PCI Port Hotplug Bernard Iremonger
    2015-07-02 14:36   ` [PATCH v6 1/2] ixgbe: changes to support " Bernard Iremonger
    2015-07-02 14:36   ` [PATCH v2] librte_ether: release memory in uninit function Bernard Iremonger
    2015-07-02 14:36   ` [PATCH v6 2/2] ixgbe: release queue memory in close functions Bernard Iremonger
    2015-07-02 14:59   ` [PATCH v6 0/2] PCI Port Hotplug Ananyev, Konstantin
    2015-07-19 15:42     ` Thomas Monjalon
    2015-07-03 14:03 ` [PATCH v6 0/7] i40e: PCI Port Hotplug Changes Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 1/7] i40e: changes to support PCI Port Hotplug Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 2/7] i40e: release vmdq vsi's in dev_close Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 3/7] i40e: increase ASQ_DELAY_MS to 100 and MAX_TRY_TIMES to 20 in i40evf_wait_cmd_done() Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 4/7] i40e: call _clear_cmd() when error occurs Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 5/7] i40e: clear queues in i40evf_dev_stop Bernard Iremonger
    2015-07-03 14:03   ` [PATCH v6 6/7] i40e: check rxq parameter in i40e_reset_rx_queue Bernard Iremonger
    2015-07-03 14:04   ` [PATCH v6 7/7] i40e: release queue memory in close functions Bernard Iremonger
    2015-07-10 20:44   ` [PATCH v6 0/7] i40e: PCI Port Hotplug Changes Zhang, Helin
    2015-07-19 19:39     ` Thomas Monjalon
    2015-07-03 14:38 ` [PATCH v7 0/2] e1000: PCI Port Hotplug changes Bernard Iremonger
    2015-07-03 14:38   ` [PATCH v7 1/2] e1000: igb and em1000 " Bernard Iremonger
    2015-07-13 15:53     ` Zhang, Helin
    2015-07-03 14:38   ` [PATCH v7 2/2] e1000: free queue memory in close functions Bernard Iremonger
    2015-07-13 15:54     ` Zhang, Helin
    2015-07-19 15:26   ` [PATCH v7 0/2] e1000: PCI Port Hotplug changes Thomas Monjalon
    2015-07-07  9:18 ` [PATCH v4 0/4] virtio: PCI Port Hotplug Bernard Iremonger
    2015-07-07  9:18   ` [PATCH v4 1/4] virtio: add support for " Bernard Iremonger
    2015-07-07  9:18   ` [PATCH v4 2/4] virtio: check vq parameter in virtqueue_detatch_unused() function Bernard Iremonger
    2015-07-07  9:18   ` [PATCH v4 3/4] virtio: free queue memory in virtio_dev_close() Bernard Iremonger
    2015-07-07 18:04     ` Stephen Hemminger
    2015-07-07  9:18   ` [PATCH v4 4/4] test-pmd: remove call to rte_eth_promiscuous_disable() from detach_port() Bernard Iremonger
    2015-07-08  0:42     ` Ouyang, Changchun
    2015-07-09  2:04       ` Tetsuya Mukawa
    2015-07-07 10:21 ` [PATCH v4 0/3] bonding PCI Port Hotplug Bernard Iremonger
    2015-07-07 10:21   ` [PATCH v4 1/3] bonding: add support for " Bernard Iremonger
    2015-07-15 10:22     ` Declan Doherty
    2015-07-07 10:21   ` [PATCH v4 2/3] test-pmd: modified testpmd for link_bonding Bernard Iremonger
    2015-07-07 10:21   ` [PATCH v4 3/3] bonding: free queue memory in stop function Bernard Iremonger
    2015-07-07 13:09 ` [PATCH v4 0/1] ring PCI Port Hotplug Bernard Iremonger
    2015-07-07 13:09   ` [PATCH v4 1/1] ring: changes to support " Bernard Iremonger
    2015-07-18 20:27     ` Thomas Monjalon
    2015-07-21 15:36       ` Iremonger, Bernard
    2015-07-27  2:52     ` Thomas Monjalon
    2015-07-13 13:04 ` [PATCH v3 0/2] librte_ether release memory Bernard Iremonger
    2015-07-13 13:04   ` [PATCH v3 1/2] librte_ether: release memory in uninit function Bernard Iremonger
    2015-07-17 13:55     ` Thomas Monjalon
    2015-07-13 13:04   ` [PATCH v3 2/2] librte_ether: release queue array memory in close function Bernard Iremonger
    2015-07-19 21:37     ` Thomas Monjalon
    2015-07-14  4:51   ` [PATCH v3 0/2] librte_ether release memory Qiu, Michael
    2015-07-14 13:10 ` [PATCH v5 0/4] virtio PCI Port Hotplug Bernard Iremonger
    2015-07-14 13:10   ` [PATCH 1/5] virtio: add support for " Bernard Iremonger
    2015-07-14 13:10   ` [PATCH 2/5] virtio: check vq parameter in virtqueue_detatch_unused() function Bernard Iremonger
    2015-07-14 13:10   ` [PATCH 3/5] virtio: add proper queue release Bernard Iremonger
    2015-07-14 13:10   ` [PATCH 4/5] virtio: free queue memory in virtio_dev_close() Bernard Iremonger
    2015-07-14 18:28     ` Stephen Hemminger
    2015-07-15  8:27       ` Iremonger, Bernard
    2015-07-15  8:38         ` Ouyang, Changchun
    2015-07-15  8:50           ` Iremonger, Bernard
    2015-07-15  1:36     ` Ouyang, Changchun
    2015-07-15  8:01       ` Iremonger, Bernard
    2015-07-15  8:36         ` Ouyang, Changchun
    2015-07-14 13:10   ` [PATCH v5 5/5] test-pmd: remove call to rte_eth_promiscuous_disable() from detach_port() Bernard Iremonger
    2015-07-15 13:50 ` [PATCH v6 0/6] virtio PCI Port Hotplug Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 1/6] virtio: add support for " Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 2/6] virtio: check vq parameter in virtqueue_detatch_unused() function Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 3/6] virtio: add proper queue release Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 4/6] virtio: free queue memory in virtio_dev_close() Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 5/6] virtio: use queue_release in dev_uninit Bernard Iremonger
    2015-07-15 13:51   ` [PATCH v6 6/6] test-pmd: remove call to rte_eth_promiscuous_disable() from detach_port() Bernard Iremonger
    2015-07-17  9:23     ` Xu, Qian Q
    2015-07-17  0:53   ` [PATCH v6 0/6] virtio PCI Port Hotplug Stephen Hemminger
    2015-07-19 20:12     ` Thomas Monjalon
    2015-07-15 15:32 ` [PATCH v5 0/3] bonding " Bernard Iremonger
    2015-07-15 15:32   ` [PATCH v5 1/3] bonding: add support for " Bernard Iremonger
    2015-07-18 20:39     ` Thomas Monjalon
    2015-07-21 10:18       ` Iremonger, Bernard
    2015-07-15 15:32   ` [PATCH v5 2/3] test-pmd: modified testpmd for link_bonding Bernard Iremonger
    2015-07-15 15:32   ` [PATCH v5 3/3] bonding: free queue memory in stop function Bernard Iremonger
    2015-07-21 15:16 ` [PATCH v6 0/3] bonding PCI Port Hotplug Bernard Iremonger
    2015-07-21 15:16   ` [PATCH v6 1/3] bonding: add support for " Bernard Iremonger
    2015-07-21 15:16   ` [PATCH v6 2/3] test-pmd: modified testpmd for link_bonding Bernard Iremonger
    2015-07-21 15:16   ` [PATCH v6 3/3] bonding: free queue memory in stop function Bernard Iremonger
    2015-07-27  2:48     ` Thomas Monjalon
    2015-07-27  8:31       ` Iremonger, Bernard
    2015-07-27  9:55         ` Thomas Monjalon
    2015-07-27 15:54 ` [PATCH v7 0/4] bonding PCI Port Hotplug Bernard Iremonger
    2015-07-27 15:54   ` [PATCH v7 1/4] bonding: add support for " Bernard Iremonger
    2015-07-27 17:14     ` Thomas Monjalon
    2015-07-27 15:54   ` [PATCH v7 2/4] test-pmd: modified testpmd for link_bonding Bernard Iremonger
    2015-07-27 17:15     ` Thomas Monjalon
    2015-07-27 15:54   ` [PATCH v7 3/4] bonding: free queue memory in close function Bernard Iremonger
    2015-07-27 15:54   ` [PATCH v7 4/4] testpmd_app_ug: add example of re-attaching bonded port Bernard Iremonger
    2015-07-27 17:38   ` [PATCH v7 0/4] bonding PCI Port Hotplug Thomas Monjalon
    2015-08-04 15:26 ` [PATCH 1/1] bonding: fix error handling in rte_eth_bond_create() Bernard Iremonger
    2015-08-04 15:52   ` Thomas Monjalon
    2015-08-05 12:28     ` Iremonger, Bernard
    2015-08-05 12:36 ` [PATCH v2 " Bernard Iremonger
    2015-08-05 12:48   ` Liu, Yong
    2015-08-05 13:15   ` Thomas Monjalon
    2015-08-05 13:19     ` Iremonger, Bernard
    2015-08-05 13:35       ` Thomas Monjalon
    2015-08-05 13:39         ` Iremonger, Bernard
    2015-08-05 14:04 ` [PATCH v3 1/1] bonding: fix device initialisation error handling Bernard Iremonger
    2015-08-06  8:19   ` Jastrzebski, MichalX K
    2015-08-10  0:06     ` Thomas Monjalon
    2015-09-28 13:03 ` [PATCH 00/20] remove pci driver from vdevs Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 01/20] librte_eal: add RTE_KDRV_NONE for vdevs Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 02/20] librte_ether: add fields from rte_pci_driver to rte_eth_dev_data Bernard Iremonger
    2015-09-29 19:08     ` Neil Horman
    2015-09-30  9:56       ` Bruce Richardson
    2015-09-30 13:14         ` Neil Horman
    2015-09-30 13:21           ` Bruce Richardson
    2015-09-30 16:33             ` Iremonger, Bernard
    2015-09-30 13:18     ` Neil Horman
    2015-09-30 13:23       ` Bruce Richardson
    2015-09-28 13:03   ` [PATCH 03/20] librte_ether: add function rte_eth_copy_dev_info() Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 04/20] null: remove pci device driver Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 05/20] ring: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 06/20] bonding: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 07/20] pcap: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 08/20] af_packet: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 09/20] xenvirt: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 10/20] mpipe: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 11/20] ixgbe: copy pci device info to eth_dev data Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 12/20] e1000: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 13/20] i40e: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 14/20] fm10k: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 15/20] bnx2x: " Bernard Iremonger
    2015-09-28 19:55     ` Stephen Hemminger
    2015-09-29  8:43       ` Iremonger, Bernard
    2015-09-28 13:03   ` [PATCH 16/20] cxgbe: " Bernard Iremonger
    2015-09-28 18:53     ` Rahul Lakkireddy
    2015-09-29  8:41       ` Iremonger, Bernard
    2015-09-28 13:03   ` [PATCH 17/20] enic: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 18/20] mlx4: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 19/20] virtio: " Bernard Iremonger
    2015-09-28 13:03   ` [PATCH 20/20] vmxnet3: " Bernard Iremonger
    2015-10-01 15:16 ` [PATCH 0/1] vmxnet3 hotplug support Bernard Iremonger
    2015-10-01 15:16   ` [PATCH 1/1] vmxnet3: add PCI Port Hotplug support Bernard Iremonger
    2015-10-02  9:08 ` [PATCH 1/2] xenvirt: add support for PCI Port Hotplug Bernard Iremonger
    2015-10-02  9:08   ` [PATCH 2/2] xenvirt: free queues in dev_close Bernard Iremonger
    2015-10-02  9:09 ` [PATCH] vhost_xen: fix compile error in main.c Bernard Iremonger
    2015-10-02  9:20 ` [PATCH 0/2] xenvirt hotplug support Bernard Iremonger
    2015-10-12 16:25 ` [PATCH v3 00/20] remove pci driver from vdevs Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 01/20] librte_eal: add RTE_KDRV_NONE for vdevs Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 02/20] librte_ether: add fields from rte_pci_driver to rte_eth_dev_data Bernard Iremonger
    2015-10-14 16:28     ` Mcnamara, John
    2015-10-16 10:34       ` Iremonger, Bernard
    2015-10-20  8:57     ` Qiu, Michael
    2015-10-20 11:18       ` Iremonger, Bernard
    2015-10-20  9:18     ` Qiu, Michael
    2015-10-20 10:35       ` Iremonger, Bernard
    2015-10-12 16:25   ` [PATCH v3 03/20] librte_ether: add function rte_eth_copy_dev_info() Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 04/20] null: remove pci device driver Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 05/20] ring: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 06/20] bonding: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 07/20] pcap: " Bernard Iremonger
    2015-10-14 16:31     ` Mcnamara, John
    2015-10-12 16:25   ` [PATCH v3 08/20] af_packet: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 09/20] xenvirt: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 10/20] mpipe: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 11/20] ixgbe: copy pci device info to eth_dev data Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 12/20] e1000: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 13/20] i40e: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 14/20] fm10k: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 15/20] bnx2x: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 16/20] cxgbe: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 17/20] enic: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 18/20] mlx4: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 19/20] virtio: " Bernard Iremonger
    2015-10-12 16:25   ` [PATCH v3 20/20] vmxnet3: " Bernard Iremonger
    2015-10-20 15:37 ` [PATCH 1/2] virtio: fixed segmentation fault in queue_release Bernard Iremonger
    2015-10-20 15:37   ` [PATCH 2/2] rel_notes: update for fix for virtio segmentation fault Bernard Iremonger
    2015-10-20 18:44   ` [PATCH 1/2] virtio: fixed segmentation fault in queue_release Stephen Hemminger
    2015-10-20 21:32     ` Thomas Monjalon
    2015-11-06 16:30 ` [PATCH 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info Bernard Iremonger
    2015-11-06 16:39   ` Thomas Monjalon
    2015-11-06 16:54     ` Iremonger, Bernard
    2015-11-06 17:20 ` [v2 0/1] librte_ether: fix coverity errors Bernard Iremonger
    2015-11-06 17:20   ` [v2 1/1] librte_ether: fix coverity errors in rte_eth_copy_pci_info Bernard Iremonger
    2015-11-10 15:40     ` Thomas Monjalon
    2015-11-23 15:20 ` [PATCH 1/1] app/test: create ring and ethdevs in pmd_ring_autotest Bernard Iremonger
    2015-11-24 16:14   ` Bruce Richardson
    2015-11-24 16:29     ` Iremonger, Bernard
    2015-11-24 16:30       ` Richardson, Bruce
    2015-11-24 17:33 ` [PATCH v2 0/2] ring pmd autotest Bernard Iremonger
    2015-11-24 17:33   ` [PATCH v2 1/2] app/test: create ring and ethdevs in pmd_ring_autotest Bernard Iremonger
    2015-11-24 17:33   ` [PATCH v2 2/2] doc: revise ring-based PMD to match latest ring PMD code Bernard Iremonger
    2015-11-27 16:07 ` [PATCH v3 0/2] ring pmd autotest Bernard Iremonger
    2015-11-27 16:07   ` [PATCH v3 1/2] app/test: fix failures in the ring_pmd_autotest program Bernard Iremonger
    2015-11-27 16:14     ` Bruce Richardson
    2015-11-27 16:40       ` Iremonger, Bernard
    2015-11-27 18:20         ` Thomas Monjalon
    2015-11-27 16:07   ` [PATCH v3 2/2] doc: correct Rings-based PMD section in the NIC Drivers guides Bernard Iremonger
    2015-11-27 16:17     ` Bruce Richardson
    2015-11-28 11:01       ` Iremonger, Bernard
    2015-11-28 11:01   ` [PATCH v4 0/2] ring pmd autotest Bernard Iremonger
    2015-11-28 11:01     ` [PATCH v4 1/2] app/test: fix failures in the ring_pmd_autotest program Bernard Iremonger
    2015-11-28 11:01     ` [PATCH v4 2/2] doc: correct Rings-based PMD section in the NIC Drivers guides Bernard Iremonger
    2015-12-01 11:24       ` Mcnamara, John
    2015-12-07  2:55     ` [PATCH v4 0/2] ring pmd autotest Thomas Monjalon
    2015-12-04 14:05 ` [PATCH] bonding: use eth_dev link state interrupt flag Bernard Iremonger
    2015-12-04 16:45   ` Declan Doherty
    2015-12-06 23:12     ` Thomas Monjalon
    2015-12-04 15:14 ` [PATCH 1/1] virtio: call rte_eth_copy_pci_info() later Bernard Iremonger
    2015-12-06 22:37   ` Thomas Monjalon
    

    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.