dpdk.git
10 years agoeal: split byte order operations to architecture specific
Chao Zhu [Tue, 28 Oct 2014 12:50:50 +0000 (13:50 +0100)]
eal: split byte order operations to architecture specific

This patch splits the byte order operations from DPDK and push them to
architecture specific arch directories, so that other processor
architecture to support DPDK can be easily adopted.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal: split atomic operations to architecture specific
David Marchand [Tue, 28 Oct 2014 12:50:48 +0000 (13:50 +0100)]
eal: split atomic operations to architecture specific

This patch first adds architecture specific directories to eal.
Then split the atomic operations to architecture specific and generic files.
Architecture specific files are put into the corresponding architecture
directory and common header are put into generic directory.

Update documentation generation with new generic/ directory.

Signed-off-by: Chao Zhu <bjzhuc@cn.ibm.com>
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoeal/linux: fix inaccurate numa node error comment
Matthew Hall [Thu, 30 Oct 2014 03:40:08 +0000 (03:40 +0000)]
eal/linux: fix inaccurate numa node error comment

Signed-off-by: Matthew Hall <mhall@mhcomputing.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
10 years agoeal/bsd: fix pci mapping in secondary process
Pablo de Lara [Thu, 30 Oct 2014 12:23:39 +0000 (12:23 +0000)]
eal/bsd: fix pci mapping in secondary process

On FreeBSD, when initializing a secondary process,
EAL was complaining if there were ports not bound
to nic_uio module, exiting the application, which
should not happen, as this is expected behaviour,
and not an error

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: fix bsd module build
Sergio Gonzalez Monroy [Thu, 30 Oct 2014 16:58:54 +0000 (16:58 +0000)]
mk: fix bsd module build

When building shared libs (for both GCC and CLANG targets), -fPIC flag
has been added to CFLAGS and leaks to BSD module build system causing
the following error:

fatal error: error in backend: Cannot select: 0x802ad8010: i64 = X86ISD::WrapperRIP 0x802ade110
      [ID=13]
  0x802ade110: i64 = TargetGlobalAddress<i8** @__stack_chk_guard> 0 [TF=5] [ID=10]

Reset CFLAGS to MODULE_CFLAGS before building BSD module.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agoixgbe: fix build with icc
Bruce Richardson [Mon, 3 Nov 2014 17:01:08 +0000 (17:01 +0000)]
ixgbe: fix build with icc

When using Intel C++ compiler(icc) 14.0.1.106 or the older icc 13.x
version, the mbuf initializer variable was not getting configured
correctly, as the mb_def variable was not set correctly. This is due
to an issue with icc (DPD200249565 which already been fixed in
icc 14.0.2 and newer compiler release) where it incorrectly calculates
the field offsets with initializers when zero-sized fields
are used in a structure.
To work around this, the code in ixgbe_rxq_vec_setup does not setup the
fields using an initializer, but instead assigns the values individually
in code.
NOTE: There is no performance impact to this change as the queue
setup functions are not data-plane APIs, but are only used at app
initialization.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: fix build with debug enabled
Choonho Son [Wed, 5 Nov 2014 15:15:47 +0000 (00:15 +0900)]
i40e: fix build with debug enabled

The commit 15dbb63ef9e9 ("VXLAN packet identification") didn't compile,
if CONFIG_RTE_LIBRTE_I40E_DEBUG_DRIVER is enabled.

Signed-off-by: Choonho Son <choonho.son@gmail.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agoapp/test: fix pci registration
Pablo de Lara [Sat, 1 Nov 2014 20:04:02 +0000 (20:04 +0000)]
app/test: fix pci registration

Since commit a155d430119 ("support link bonding device initialization"),
rte_eal_pci_probe() is called in rte_eal_init().
pci_autotest called it to bind devices to the test_driver and test_driver2.
Therefore, the function is called twice and devices already allocated
will cause the test fail.

This patch solves that issue, unregistering all previous drivers before
calling rte_eal_pci_probe() for the first time, so DPDK does not try
to allocate data for the devices, binding them to their previous
drivers again.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agoapp/test: fix memory needs since tailq rework
Anatoly Burakov [Wed, 5 Nov 2014 12:11:17 +0000 (12:11 +0000)]
app/test: fix memory needs since tailq rework

As a result of moving tailq's into local memory, some tailq data
is now reserved in rte_malloc heaps (because it needs to be
shared across DPDK processes). The first thing DPDK initializes
is a log mempool, and since it creates a tailq, it reserves
space in rte_malloc heap before allocating the mempool itself.
By default, rte_malloc allocates way more space than is necessary,
so under some conditions (namely, overall memory available is low)
this results in malloc heap eating up so much memory that log
mempool is not able to allocate its memzone.

This patch fixes the unit tests to account for that change.

Reported-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: full VMDQ pools support
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:29 +0000 (18:01 +0800)]
i40e: full VMDQ pools support

1. Function i40e_vsi_* name change to i40e_dev_* since PF can contains
   more than 1 VSI after VMDQ enabled.
2. i40e_dev_rx/tx_queue_setup change to have capability of setup
   queues that belongs to VMDQ pools.
3. Add queue mapping. This will do a convertion between queue index
   that application used and real NIC queue index.
3. i40e_dev_start/stop change to have capability switching VMDQ queues.
4. i40e_pf_config_rss change to calculate actual main VSI queue numbers
   after VMDQ pools introduced.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: enhance mac address operations
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:28 +0000 (18:01 +0800)]
i40e: enhance mac address operations

Change i40e_macaddr_add and i40e_macaddr_remove functions to support
multiple macaddr add/delete. In the meanwhile, support macaddr ops
on different pools.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: add VMDQ support
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:27 +0000 (18:01 +0800)]
i40e: add VMDQ support

The change includes several parts:
1. Get maximum number of VMDQ pools supported in dev_init.
2. Fill VMDQ info in i40e_dev_info_get.
3. Setup VMDQ pools in i40e_dev_configure.
4. i40e_vsi_setup change to support creation of VMDQ VSI.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoixgbe: new VMDQ argument
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:26 +0000 (18:01 +0800)]
ixgbe: new VMDQ argument

Assign new VMDQ arguments with correct values.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoigb: new VMDQ argument
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:25 +0000 (18:01 +0800)]
igb: new VMDQ argument

Assign new VMDQ arguments with correct values.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoethdev: VMDQ enhancements
Chen Jing D(Mark) [Tue, 4 Nov 2014 10:01:24 +0000 (18:01 +0800)]
ethdev: VMDQ enhancements

The change includes several parts:
1. Clear pool bitmap when trying to remove specific MAC.
2. Define RSS, DCB and VMDQ flags to combine rx_mq_mode.
3. Use 'struct' to replace 'union', which to expand the rx_adv_conf
   arguments to better support RSS, DCB and VMDQ.
4. Fix bug in rte_eth_dev_config_restore function, which will restore
   all MAC address to default pool.
5. Define additional 3 arguments for better VMDQ support.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
10 years agoi40e: fix PF interrupt handler
Helin Zhang [Tue, 4 Nov 2014 08:08:14 +0000 (16:08 +0800)]
i40e: fix PF interrupt handler

'PFINT_ICR0_ENA' shouldn't be cleared in user space ISR,
otherwise adminq interrupts might be missed during
co-working with VF initialization.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
10 years agodoc: release notes 1.7
Bernard Iremonger [Thu, 30 Oct 2014 10:56:39 +0000 (10:56 +0000)]
doc: release notes 1.7

The 1.7 DPDK_Release_Notes document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
The top level index file has been modified to include this document.

This is the third document from a set of 6 documents

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agodoc: fix a typo
Jincheng Miao [Fri, 31 Oct 2014 14:58:26 +0000 (14:58 +0000)]
doc: fix a typo

Signed-off-by: Jincheng Miao <jmiao@redhat.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agoi40e: handle link status change interrupt
Helin Zhang [Wed, 17 Sep 2014 07:54:21 +0000 (15:54 +0800)]
i40e: handle link status change interrupt

As driver flag of 'RTE_PCI_DRV_INTR_LSC' was introduced
recently, it must be added in i40e. One second waiting
is needed for link up event, to wait the hardware into a
stable state, so the interrupt could be processed in two
parts. In addition, it should finally call the callback
function registered by application.

Test: http://dpdk.org/ml/archives/dev/2014-September/006091.html

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jing Chen <jing.d.chen@intel.com>
Reviewed-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
10 years agoi40e: rework PF interrupt cause processing
Helin Zhang [Wed, 17 Sep 2014 07:54:20 +0000 (15:54 +0800)]
i40e: rework PF interrupt cause processing

To get the code cleaner and more straightforward, a macro
is defined for all interrupt cause enable flags. Two more
causes are enabled, and all the interrupt causes for
reporting any errors are compiled conditionally, as they
are for debug only.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jing Chen <jing.d.chen@intel.com>
Reviewed-by: Jijiang Liu <jijiang.liu@intel.com>
10 years agoi40e: rename variables in interrupt handler
Helin Zhang [Wed, 17 Sep 2014 07:54:19 +0000 (15:54 +0800)]
i40e: rename variables in interrupt handler

To be more straightforward, two local variables in interrupt
handler are renamed.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jing Chen <jing.d.chen@intel.com>
Reviewed-by: Jijiang Liu <jijiang.liu@intel.com>
10 years agoi40e: fix mac vlan filter
Jijiang Liu [Fri, 31 Oct 2014 03:28:12 +0000 (11:28 +0800)]
i40e: fix mac vlan filter

This patch fixes two issues:
- one is to fix the log issues
- the other is to set filter type when updating the default MAC filter.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
10 years agoethdev: fix mac vlan filter type
Jijiang Liu [Fri, 31 Oct 2014 02:26:22 +0000 (10:26 +0800)]
ethdev: fix mac vlan filter type

Use the enum type for filter type.
It fixes the compilation error under ICC compiler.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoapp/testpmd: mac vlan filter for VF
Jijiang Liu [Fri, 24 Oct 2014 07:58:45 +0000 (15:58 +0800)]
app/testpmd: mac vlan filter for VF

Add a test command in testpmd to test VF MAC filter feature.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoi40evf: mac vlan filter
Jijiang Liu [Fri, 24 Oct 2014 07:58:44 +0000 (15:58 +0800)]
i40evf: mac vlan filter

It mainly add i40e_vf_mac_filter_set() function to support perfect match
and hash match of MAC address and VLAN ID for VF.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoi40e: mac vlan filter
Jijiang Liu [Fri, 24 Oct 2014 07:58:43 +0000 (15:58 +0800)]
i40e: mac vlan filter

This patch mainly optimizes the i40e_add_macvlan_filters() and
the i40e_remove_macvlan_filters() functions in order that
we are able to provide filter type configuration.
And another relevant MAC filter codes are changed based on new data structures.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoethdev: mac vlan filter
Jijiang Liu [Fri, 24 Oct 2014 07:58:42 +0000 (15:58 +0800)]
ethdev: mac vlan filter

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoexamples/vhost: allow mergeable packets with vector ixgbe
Ouyang Changchun [Thu, 30 Oct 2014 02:11:16 +0000 (10:11 +0800)]
examples/vhost: allow mergeable packets with vector ixgbe

Since the commit 33e79bed3edc2bcf59 has fixed the issue in vector PMD,
and then it can receive jumbo frame by scatter-gather mode, so remove this check.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
10 years agokni: fix build on Ubuntu-hybrids
Alexander Guy [Thu, 23 Oct 2014 23:39:32 +0000 (16:39 -0700)]
kni: fix build on Ubuntu-hybrids

In the case where a userspace reports itself as Ubuntu, but the
kernel isn't providing the expected version signature interface,
turn off Ubuntu specializations.

This situation happens often enough in development environments,
and with multi-distribution build servers (e.g. chroot, containers).

Signed-off-by: Alexander Guy <alexander@andern.org>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoip_frag: disable ip fragmentation if mbuf refcnt is disabled
Pablo de Lara [Wed, 22 Oct 2014 11:17:01 +0000 (12:17 +0100)]
ip_frag: disable ip fragmentation if mbuf refcnt is disabled

rte_ipv4_fragment_packet() and rte_ipv6_fragment packet()
call rte_pktmbuf_attach() to attach the segment of the original
packet to the segment of the new fragmented one. Such function
is not declared if RTE_MBUF_REFCNT is disabled, as it needs to
call rte_mbuf_refcnt_update, not declared either.

Therefore, the ipv4/v6 fragmentation libraries are disabled
in that situation.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
10 years agoixgbe: always perform vector Rx setup if vpmd enabled
Bruce Richardson [Wed, 22 Oct 2014 10:55:45 +0000 (11:55 +0100)]
ixgbe: always perform vector Rx setup if vpmd enabled

If the vector pmd option is turned on in the compile time config file,
then always call the vector rxq setup, since we can now use the vector
PMD for receiving jumbo frames that need chained mbufs, a.k.a scattered
packets. Up till now, this function was not being called when receiving
scattered packets, potentially leading to problems with mbufs not being
properly initialized.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <Changchun.ouyang@intel.com>
10 years agoixgbe: remove static qualifier for thread safety
Bruce Richardson [Wed, 22 Oct 2014 10:55:44 +0000 (11:55 +0100)]
ixgbe: remove static qualifier for thread safety

Remove the "static" prefix to the template mbuf variable in
ixgbe_rxq_vec_setup function. This will then allow different
threads to initialize different RX queues at the same time,
without one overwriting the other's data.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Changchun Ouyang <Changchun.ouyang@intel.com>
10 years agovhost: fix build without unused result
Ouyang Changchun [Wed, 29 Oct 2014 06:39:38 +0000 (14:39 +0800)]
vhost: fix build without unused result

It fixes this compilation complain: "error: ignoring return value of 'realpath',
declared with attribute warn_unused_result [-Werror=unused-result]"

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Tested-by: Jingguo Fu <jingguox.fu@intel.com>
10 years agoi40e/base: remove early hardware definitions
Helin Zhang [Wed, 29 Oct 2014 07:09:30 +0000 (15:09 +0800)]
i40e/base: remove early hardware definitions

As i40e_register_x710_int.h is defined for early hardware
only, it should be deleted.
For the register which is still required, just define it in
code directly as workaround.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
10 years agoi40e: fix configuration of Rx interrupt
Helin Zhang [Wed, 29 Oct 2014 03:42:48 +0000 (11:42 +0800)]
i40e: fix configuration of Rx interrupt

Inside NIC RX interrupt is needed for single RX descriptor
write back. The fix is to correct the wrong configuration
of register 'I40E_QINT_RQCTL'.
Note that interrupt will be inside NIC only, that means it
will never be reported outside NIC hardware.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
10 years agoi40e: code style fixes
Helin Zhang [Wed, 29 Oct 2014 03:42:47 +0000 (11:42 +0800)]
i40e: code style fixes

Add several code style fixes.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
10 years agodoc: getting started guide for freebsd
Bernard Iremonger [Thu, 23 Oct 2014 14:15:28 +0000 (14:15 +0000)]
doc: getting started guide for freebsd

The 1.7 DPDK_FreeBSD_GSG document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
The top level index file has been modified to include this guide.

This is the second document from a set of 6 documents.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agofix VXLAN acronym
Thomas Monjalon [Mon, 27 Oct 2014 15:11:04 +0000 (16:11 +0100)]
fix VXLAN acronym

Each letter must be uppercased:
Virtual eXtensible Local Area Network (VXLAN)

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoapp/testpmd: VXLAN Tx checksum offload
Jijiang Liu [Thu, 23 Oct 2014 13:19:00 +0000 (21:19 +0800)]
app/testpmd: VXLAN Tx checksum offload

Add test cases in testpmd to test VxLAN Tx checksum offload, which includes
 - IPv4 and IPv6 packet
 - outer L3, inner L3 and L4 checksum offload for Tx side.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoi40e: VXLAN Tx checksum offload
Jijiang Liu [Thu, 23 Oct 2014 13:18:59 +0000 (21:18 +0800)]
i40e: VXLAN Tx checksum offload

Support VxLAN Tx checksum offload, which include
  - outer L3(IP) checksum offload
  - inner L3(IP) checksum offload
  - inner L4(UDP, TCP and SCTP) checksum offload

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoapp/testpmd: VXLAN filter
Jijiang Liu [Thu, 23 Oct 2014 13:18:58 +0000 (21:18 +0800)]
app/testpmd: VXLAN filter

Add the "tunnel_filter" command in testpmd to test the API of VxLAN
packet filter.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoi40e: VXLAN filter
Jijiang Liu [Thu, 23 Oct 2014 13:18:57 +0000 (21:18 +0800)]
i40e: VXLAN filter

The filter types supported are listed below for VXLAN:
   1. Inner MAC and Inner VLAN ID.
   2. Inner MAC address, inner VLAN ID and tenant ID.
   3. Inner MAC and tenant ID.
   4. Inner MAC address.
   5. Outer MAC address, tenant ID and inner MAC address.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoethdev: tunnel filter
Jijiang Liu [Thu, 23 Oct 2014 13:18:56 +0000 (21:18 +0800)]
ethdev: tunnel filter

Add definitions of the data structures of tunneling packet filter.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoapp/testpmd: VXLAN packet identification
Jijiang Liu [Thu, 23 Oct 2014 13:18:55 +0000 (21:18 +0800)]
app/testpmd: VXLAN packet identification

Add two commands to test VXLAN packet identification.
The test steps are as follows:
 1> use commands to add/delete VxLAN UDP port.
 2> use rxonly mode to receive VxLAN packet.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoi40e: VXLAN packet identification
Jijiang Liu [Thu, 23 Oct 2014 13:18:54 +0000 (21:18 +0800)]
i40e: VXLAN packet identification

Implement the configuration API of VXLAN destination UDP port,
and add new Rx offload flags for supporting VXLAN packet offload.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
10 years agoethdev: UDP tunnels
Jijiang Liu [Thu, 23 Oct 2014 13:18:53 +0000 (21:18 +0800)]
ethdev: UDP tunnels

Add two functions to support UDP tunneling port configuration.

There are "some" destination UDP port numbers that have unique meaning.
In terms of VxLAN, "IANA has assigned the value 4789 for the VXLAN UDP port,
and this value SHOULD be used by default as the destination UDP port.
Some early implementations of VXLAN have used other values for the destination
port. To enable interoperability with these implementations, the destination
port SHOULD be configurable."

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoether: add VXLAN header
Jijiang Liu [Thu, 23 Oct 2014 13:18:52 +0000 (21:18 +0800)]
ether: add VXLAN header

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agombuf: add fields for tunnels
Jijiang Liu [Thu, 23 Oct 2014 13:18:51 +0000 (21:18 +0800)]
mbuf: add fields for tunnels

Replace the "reserved2" field with the "packet_type" field
and add the "inner_l2_l3_len" field in the rte_mbuf structure.
The "packet_type" field is used to indicate ordinary packet format and also
tunneling packet format such as IP in IP, IP in GRE, MAC in GRE and MAC in UDP.
The "inner_l2_len" and the "inner_l3_len" fields are added
in the second cache line, they use 2 bytes for TX offloading of tunnels.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodoc: getting started guide for linux
Bernard Iremonger [Thu, 16 Oct 2014 13:27:42 +0000 (13:27 +0000)]
doc: getting started guide for linux

The 1.7 DPDK_Linux_GSG document in MSWord has been converted to rst format for
use with Sphinx. There is an rst file for each chapter and an index.rst file
which contains the table of contents.
This is the first document from a set of documents.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
10 years agoexamples/vhost: add new example based on lib
Huawei Xie [Mon, 20 Oct 2014 04:38:26 +0000 (12:38 +0800)]
examples/vhost: add new example based on lib

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: clean makefile and add in examples/Makefile]

10 years agoexamples/vhost: minor fixes
Huawei Xie [Mon, 20 Oct 2014 04:38:23 +0000 (12:38 +0800)]
examples/vhost: minor fixes

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: add branch hints
Huawei Xie [Mon, 20 Oct 2014 04:38:24 +0000 (12:38 +0800)]
examples/vhost: add branch hints

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: disable guest notifications
Huawei Xie [Thu, 23 Oct 2014 09:24:26 +0000 (11:24 +0200)]
examples/vhost: disable guest notifications

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: mergeable buffer option
Huawei Xie [Thu, 23 Oct 2014 09:21:13 +0000 (11:21 +0200)]
examples/vhost: mergeable buffer option

Mergeable feature doesn't work with latest mbuf change.
Disabling IXGBE_INC_VECTOR is a temporary workaround.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: adapt Tx routing to lib
Huawei Xie [Mon, 20 Oct 2014 04:38:19 +0000 (12:38 +0800)]
examples/vhost: adapt Tx routing to lib

The packet passed to virtio_tx_route has been allocated
mbuf, so there is no need to allocate mbuf for it.
Use vlan offload to transmit vlan tagged packet.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: remove useless mbuf pool]

10 years agoexamples/vhost: use burst enqueue and dequeue from lib
Huawei Xie [Mon, 20 Oct 2014 04:38:18 +0000 (12:38 +0800)]
examples/vhost: use burst enqueue and dequeue from lib

In switch_worker and virtio_tx_local, rte_vhost_enqueue_burst is called to
push host packets to guest VM.
Before enqueue packets to guest VM, vhost example uses configure-able retry logic
to wait for enough vring entries.
In switch_worker, rte_vhost_dequeue_burst is called to get packets from guest VM,
then virtio device will be bound to a queue in VMDQ for the first transmitted
packet.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: register with lib
Huawei Xie [Thu, 23 Oct 2014 09:24:56 +0000 (11:24 +0200)]
examples/vhost: register with lib

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: hpa regions for zero copy
Huawei Xie [Mon, 20 Oct 2014 04:38:15 +0000 (12:38 +0800)]
examples/vhost: hpa regions for zero copy

check_hpa_regions, fill_hpa_memory_regions and hpa memory region
data structure are added back from old virtio-net.c.

Add hpa (host physical address) region generation/destroy logic.
gpa<->hpa memory translation regions are generated at new_device,
when a virtio device is ready for packet processing.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: add vhost dev struct
Huawei Xie [Mon, 20 Oct 2014 04:38:16 +0000 (12:38 +0800)]
examples/vhost: add vhost dev struct

Define vhost_dev data structure.
Change reference to virtio_dev to vhost_dev.
The vhost example use vdev data structure for switching related logic
and container for virtio_dev.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: remove functions implemented in lib
Huawei Xie [Mon, 20 Oct 2014 04:38:14 +0000 (12:38 +0800)]
examples/vhost: remove functions implemented in lib

Those functions are integrated into the user space vhost library:
virtio_dev_rx, virtio_dev_merge_rx, virtio_dev_tx, virtio_dev_merge_tx,
copy_from_mbuf_to_ring, gpa_to_vva.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agoexamples/vhost: copy old vhost example
Huawei Xie [Mon, 20 Oct 2014 04:38:13 +0000 (12:38 +0800)]
examples/vhost: copy old vhost example

This patch copies two files main.c/main.h from most recent vhost example
(before transforming into a library) as the base for new vhost example.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agobond: disable broadcast mode if mbuf refcnt is disabled
Declan Doherty [Wed, 22 Oct 2014 12:59:24 +0000 (13:59 +0100)]
bond: disable broadcast mode if mbuf refcnt is disabled

Link bonding broadcast mode requires refcnt parameter in the mbuf struct to
allow efficient transmission of duplicated mbufs on slave ports.

This patch disables broadcast mode when the complication option RTE_MBUF_REFCNT
is disabled to allow clean building of the bonding library.
A warning message notify user of disabling of broadcast mode.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agokni: fix build
Marc Sune [Wed, 22 Oct 2014 10:23:11 +0000 (12:23 +0200)]
kni: fix build

Fix compilation warning 'missing-field-initializers' for some GCC and clang
versions introduced in commit 0c6bc8e due to the use of C89/C90 initializers.
Using C99-style initializers

Signed-off-by: Marc Sune <marc.sune@bisdn.de>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agokni: memzone pool for alloc and release
Marc Sune [Tue, 21 Oct 2014 10:46:55 +0000 (12:46 +0200)]
kni: memzone pool for alloc and release

The previous implementation of rte_kni_alloc() was allocating memzones with a
name composed of a fixed string and the interface name. When an application was
allocating and deallocating multiple interfaces with different names, memzones
were quickly exhausted, even though memzones from deallocated interfaces were
never used anymore (unless an interface with the same name was re-allocated).
As a result, the application was unable to allocate more KNI interfaces with
different names.

This patch implements the KNI memzone pool in order to prevent memzone
exhaustion when allocating/deallocating KNI interfaces. It adds a new API call,
rte_kni_init(max_kni_ifaces) that shall be called before any call to
rte_kni_alloc() if KNI is used. The memzones are pre-allocated with interface-
independent names so that they can be reused.

Signed-off-by: Marc Sune <marc.sune@bisdn.de>
Acked-by: Helin Zhang <helin.zhang@intel.com>
10 years agoixgbe: fix build with mbuf refcnt disabled
Ouyang Changchun [Tue, 21 Oct 2014 06:59:16 +0000 (14:59 +0800)]
ixgbe: fix build with mbuf refcnt disabled

An error has been introduced by commit 1f22652ca8869
("fix perf regression due to moved pool ptr").

Fix the case where RTE_MBUF_REFCNT is disabled.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: generic filter control
Jingjing Wu [Mon, 20 Oct 2014 05:40:33 +0000 (13:40 +0800)]
i40e: generic filter control

Only provide empty handler.
It can be completed to support filter features on fortville.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: remove unused empty functions]

10 years agoethdev: introduce generic filter control
Jingjing Wu [Mon, 20 Oct 2014 05:40:32 +0000 (13:40 +0800)]
ethdev: introduce generic filter control

Define a new API umbrella to configure any kind of Rx filtering.
New functions:
- rte_eth_dev_filter_supported
- rte_eth_dev_filter_ctrl

Filter types, operations, and structures are defined specifically in new
header file lib/librte_eth/rte_dev_ctrl.h.

As to the implementation discussion, please refer to
http://dpdk.org/ml/archives/dev/2014-September/005179.html

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: rename ops and remove unused types]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40evf: support RSS
Helin Zhang [Mon, 20 Oct 2014 02:58:18 +0000 (10:58 +0800)]
i40evf: support RSS

i40e hardware supports RSS in VF.
It's now supported in this driver.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
10 years agoi40e: expose RSS functions and relevant macros
Helin Zhang [Mon, 20 Oct 2014 02:58:17 +0000 (10:58 +0800)]
i40e: expose RSS functions and relevant macros

To reuse code, 'i40e_config_hena()' and 'i40e_parse_hena()' and
their relevant macros need to be extern, and then can be used for
both PF and VF parts.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
10 years agoethdev: better typing of RSS constants
Helin Zhang [Mon, 20 Oct 2014 02:58:16 +0000 (10:58 +0800)]
ethdev: better typing of RSS constants

Forced type conversion is not needed to define a macro with
constant. The alternate is to let compiler use the default width,
or specify the width with suffix of 'U', 'UL', 'ULL', etc.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
10 years agoapp/test: fix crash for fbk hashes with a lot of entries
Bruce Richardson [Fri, 17 Oct 2014 13:18:12 +0000 (14:18 +0100)]
app/test: fix crash for fbk hashes with a lot of entries

The four-byte-key (fbk) autotest was allocating the keys to be used for
the test on the stack. When the number of entries in the table was
increased significantly, for example, to test larger hashes by increase the
value of ENTRIES, this array of keys was greater than that
allowed on the stack, and so caused problems, i.e. crashes and core dumps.

The solution is to have the keys dynamically allocated on the heap using
malloc. Now if ENTRIES is increased and we run out of memory we get an
error message instead of a crash.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agocontigmem: fix buffer overrun on unload
Alan Carew [Tue, 14 Oct 2014 12:18:36 +0000 (13:18 +0100)]
contigmem: fix buffer overrun on unload

The maximum mount contiguous memory regions for FreeBSD is limited by
RTE_CONTIGMEM_MAX_NUM_BUFS, a pointer to each region is stored in
static void * contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS]

A user can specify a greater amount via hw.contigmem.num_buffers,
while the allocation logic will prevent this allocation from occuring the logic
in contigmem_unload() will attempt to free hw.contigmem.num_buffers and an
overrun occurs.

This patch limits the freeing to a maximum of RTE_CONTIGMEM_MAX_NUM_BUFS.

Signed-off-by: Alan Carew <alan.carew@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agoethdev: fix memory corruption with default Rx/Tx configuration
Pablo de Lara [Mon, 20 Oct 2014 17:26:35 +0000 (18:26 +0100)]
ethdev: fix memory corruption with default Rx/Tx configuration

Commit fbde27f1 (get default Rx/Tx configuration from dev info),
introduced a bug, which caused memory corruption in dev_info.
To get RX/TX configuration, both rx/tx queue setup functions were calling
dev_info_get from PMDs, so dev_info structure was not being reseted
before being populated.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: fix doc cleaning
Thomas Monjalon [Fri, 17 Oct 2014 15:00:53 +0000 (17:00 +0200)]
mk: fix doc cleaning

With make 3.x, guides-% is matched instead of guides-%-clean.
Move the less specific target pattern (guides-%) at the end
to allow matching guides-%-clean first.

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodoc: add copyright and version
Bernard Iremonger [Wed, 15 Oct 2014 20:17:02 +0000 (22:17 +0200)]
doc: add copyright and version

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: generate html guides with sphinx
Thomas Monjalon [Wed, 15 Oct 2014 20:12:20 +0000 (22:12 +0200)]
mk: generate html guides with sphinx

Add minimal configuration and index to validate new rules
inside "make doc" and "make doc-clean".
RTE_SPHINX_BUILD can be overriden.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agodoc: move doxygen files in api subdirectory
Thomas Monjalon [Wed, 15 Oct 2014 19:43:41 +0000 (21:43 +0200)]
doc: move doxygen files in api subdirectory

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: rename doxygen rules
Thomas Monjalon [Wed, 15 Oct 2014 19:28:13 +0000 (21:28 +0200)]
mk: rename doxygen rules

This new naming will help to be consistent with coming rules.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agomk: fix doxygen clean
Bernard Iremonger [Wed, 15 Oct 2014 16:51:10 +0000 (18:51 +0200)]
mk: fix doxygen clean

RTE_OUTPUT variable is always defined, unlike $O.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agovirtio: increase max Rx packet length
Ouyang Changchun [Mon, 13 Oct 2014 03:46:12 +0000 (11:46 +0800)]
virtio: increase max Rx packet length

Since commit 13ce5e7eb94 ("virtio: mergeable buffers"),
this driver has the capability of receiving and transmitting jumbo frame.
So update max Rx packet length.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Tested-by: Jingguo Fu <jingguox.fu@intel.com>
10 years agomk: pass CC option for kernel modules
Sergio Gonzalez Monroy [Thu, 9 Oct 2014 10:08:33 +0000 (11:08 +0100)]
mk: pass CC option for kernel modules

At least on kernels 3.15 or newer, wrong compiler flags are set when building
kernel modules.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
10 years agomk: pass verbose flag for kernel modules
Sergio Gonzalez Monroy [Mon, 6 Oct 2014 16:09:09 +0000 (17:09 +0100)]
mk: pass verbose flag for kernel modules

Linux kernel build system requires V=1 to enable verbose output, but
current DPDK framework just check if V is defined.

Fix: force V=1 when building Linux kernel modules if verbose output is
enabled.

Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agoi40e: add Rx error statistics
Jijiang Liu [Wed, 15 Oct 2014 03:14:38 +0000 (11:14 +0800)]
i40e: add Rx error statistics

Add incoming packet error statistics for i40e.

Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
10 years agoi40e/base: fix build with gcc < 4.4
Helin Zhang [Mon, 13 Oct 2014 07:18:19 +0000 (15:18 +0800)]
i40e/base: fix build with gcc < 4.4

It fixes the compile error as below on gcc version 4.3.4.
cc1: error: unrecognized command line option "-Wno-unused-but-set-variable"

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
10 years agovirtio: fix needed vring entry number
Ouyang Changchun [Wed, 15 Oct 2014 03:11:00 +0000 (11:11 +0800)]
virtio: fix needed vring entry number

Fix one issue in virtio TX: it needs one more vring descriptor to hold the virtio
header when transmitting packets, it is used later to determine whether to free
more entries from used vring.
It fixes failing to transmit any packet with 1 segment in the circumstance of only
1 descriptor in the vring free list.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
10 years agovhost: add in doc
Thomas Monjalon [Mon, 13 Oct 2014 17:22:45 +0000 (19:22 +0200)]
vhost: add in doc

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
10 years agovhost: add makefile
Huawei Xie [Wed, 8 Oct 2014 18:54:59 +0000 (02:54 +0800)]
vhost: add makefile

vhost lib is turned off by default.
vhost lib is based on cuse, which requires fuse development package
to be installed.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: fix build dependencies]

10 years agovhost: comment identified issues
Huawei Xie [Wed, 8 Oct 2014 18:54:58 +0000 (02:54 +0800)]
vhost: comment identified issues

1) FIXME: concurrent calls to vhost set mem table from different guests
could cause mem_temp to be overrided.
2) TODO: cmpset cost quite some cpu cyles. Allow app to disable this
feature if there is no contention in real workload.
3) FIXME: fix scatter gather mbuf copy to vhost vring chained buffers.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: coding style fixes
Huawei Xie [Wed, 8 Oct 2014 18:54:57 +0000 (02:54 +0800)]
vhost: coding style fixes

Fix serious coding style issues reported by checkpatch.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: static variable fixes
Huawei Xie [Wed, 8 Oct 2014 18:54:55 +0000 (02:54 +0800)]
vhost: static variable fixes

Add "static" for some variable definitions.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: clean includes
Huawei Xie [Wed, 8 Oct 2014 18:54:54 +0000 (02:54 +0800)]
vhost: clean includes

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: add debug print
Huawei Xie [Wed, 8 Oct 2014 18:54:52 +0000 (02:54 +0800)]
vhost: add debug print

Define PRINT_PACKET and LOG_DEBUG macros.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: add private context field
Huawei Xie [Wed, 8 Oct 2014 18:54:56 +0000 (02:54 +0800)]
vhost: add private context field

priv field could be used to store application specific context.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: supported features
Huawei Xie [Wed, 8 Oct 2014 18:54:53 +0000 (02:54 +0800)]
vhost: supported features

VHOST_SUPPORTED_FEATURES is the feature mask that vhost lib supports.
VHOST_FEATURES is the feature mask vhost currently supports after some features are turned on/off.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agovhost: allow to enable or disable features
Huawei Xie [Wed, 8 Oct 2014 18:54:51 +0000 (02:54 +0800)]
vhost: allow to enable or disable features

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agovhost: get available vring entries
Huawei Xie [Wed, 8 Oct 2014 18:54:51 +0000 (02:54 +0800)]
vhost: get available vring entries

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
[Thomas: split patch]

10 years agovhost: rename ops registering function
Huawei Xie [Wed, 8 Oct 2014 18:54:50 +0000 (02:54 +0800)]
vhost: rename ops registering function

Rename init_virtio_net as rte_vhost_callback_register API.
rte_vhost_callback_register register the callbacks called when a
vhost device is created and ready to be added to data processing core
or is de-actived by guest.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: expose register and start functions
Huawei Xie [Wed, 8 Oct 2014 18:54:49 +0000 (02:54 +0800)]
vhost: expose register and start functions

Rename register_cuse_device as rte_vhost_driver_register API.
Rename start_session_loop as rte_vhost_driver_session_start API.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: get internal ops when registering
Huawei Xie [Wed, 8 Oct 2014 18:54:48 +0000 (02:54 +0800)]
vhost: get internal ops when registering

vhost_net_device_ops is internal implementation in vhost lib.
register_cuse_device will be vhost driver register API.
There is no need for it to know the internal vhost ops.
Instead, that ops is retrieved in register_cuse_device
through get_virtio_net_callbacks.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
10 years agovhost: remove index parameter
Huawei Xie [Wed, 8 Oct 2014 18:54:47 +0000 (02:54 +0800)]
vhost: remove index parameter

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>