dpdk.git
11 years agoethdev: random MAC address
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ethdev: random MAC address

Factorize code by moving random_addr() function in only place.
It will be reused for virtio.

Signed-off-by: Intel
11 years agoeal: increase I/O privilege
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: increase I/O privilege

Set I/O privilege to the highest level (3).
It is needed for virtio.

Signed-off-by: Intel
11 years agopcap: add new driver
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
pcap: add new driver

This PMD uses libpcap to send/receive packets to/from any NIC.
It can also read/write to/from a file.

Signed-off-by: Intel
11 years agoring: add new driver
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ring: add new driver

This PMD is a set of FIFOs using rte_ring without any NIC.
It can be used as a loopback.

Signed-off-by: Intel
11 years agoethdev: allow device without registered driver
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ethdev: allow device without registered driver

It is needed for non-pci devices (ring and pcap).

Signed-off-by: Intel
11 years agoethdev: export allocate function
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ethdev: export allocate function

The function rte_eth_dev_allocate() was called by rte_eth_dev_init().
In order to use it for non-pci devices, it is now in public API.

Signed-off-by: Intel
11 years agoeal: introduce non-pci devices
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: introduce non-pci devices

This type of pseudo-device is needed for ring and pcap PMDs.
They are compatible with whitelist and are initialized in rte_eal_init().

Signed-off-by: Intel
11 years agoixgbe: add VMDq support
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ixgbe: add VMDq support

Signed-off-by: Intel
11 years agoigb: add VMDq support
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
igb: add VMDq support

Signed-off-by: Intel
11 years agoethdev: add VMDq support
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ethdev: add VMDq support

Signed-off-by: Intel
11 years agoixgbe: fix VF init without setup
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ixgbe: fix VF init without setup

In case of multi-process application, the secondary process can initialize
the driver without configuring queues. In this case the Rx/Tx functions
were not initialized because it was only done in queue setup.

Fix by reproducing the same behaviour as in eth_ixgbe_dev_init().

Signed-off-by: Intel
11 years agoigb: fix VF init without setup
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
igb: fix VF init without setup

In case of multi-process application, the secondary process can initialize
the driver without configuring queues. In this case the Rx/Tx functions
were not initialized because it was only done in queue setup.

Fix by reproducing the same behaviour as in eth_igb_dev_init().

Signed-off-by: Intel
11 years agoe1000: fix descriptor overflow
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
e1000: fix descriptor overflow

Allow rxq->rx_tail + offset > 65535
in eth_em_rx_descriptor_done().

Signed-off-by: Intel
11 years agoe1000: minor changes
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
e1000: minor changes

Signed-off-by: Intel
11 years agoethdev: reset unsupported stats
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
ethdev: reset unsupported stats

Initialize statistics structure to 0 before passing it to the PMD.
This way, the unsupported fields will be 0.

Signed-off-by: Intel
11 years agomem: retrieve mempool cache only when needed
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
mem: retrieve mempool cache only when needed

It is an optimization for the single consumer case,
or when cache is too small,
or when cache is disabled.

Signed-off-by: Intel
11 years agomem: retry malloc with smaller block size when failure
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
mem: retry malloc with smaller block size when failure

rte_malloc try to allocate memzone blocks with a minimum size.
It it fails, it retries for a smaller size than the standard one.
It will really fail if it cannot allocate block of the requested size.

Signed-off-by: Intel
11 years agotimer: use a skip list
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
timer: use a skip list

The skip list algorithm allows to improve the scalability.

Signed-off-by: Intel
11 years agolpm: rework rules storage
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
lpm: rework rules storage

Signed-off-by: Intel
11 years agosched: minor changes
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
sched: minor changes

Do not define grinder_credits_check() if it is not used.

Signed-off-by: Intel
11 years agoeal: use pause only with SSE2
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: use pause only with SSE2

The pause instruction is part of SSE2 extensions.
Note that some compilers define _mm_pause as "rep; nop" instead of "pause".
For compatible processors, they are equivalent.

http://www.intel.com/Assets/PDF/manual/325383.pdf:
"
When executing a spin-wait loop, a Pentium 4 or Intel Xeon processor suffers
a severe performance penalty when exiting the loop because it detects a
possible memory order violation.
The PAUSE instruction provides a hint to the processor that the code sequence
is a spin-wait loop. The processor uses this hint to avoid the memory order
violation in most situations, which greatly improves processor performance.
"

Signed-off-by: Intel
11 years agoeal: allow to whitelist devices
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: allow to whitelist devices

The new option --use-device is a PCI whitelist.
It is the opposite to -b option.

Signed-off-by: Intel
11 years agoeal: allow to blacklist address without domain prefix
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: allow to blacklist address without domain prefix

These 2 formats are now accepted:
    domain:bus:device.function
           bus:device.function

Signed-off-by: Intel
11 years agoeal: rework CPU mask parsing
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: rework CPU mask parsing

The CPU mask was limited to "unsigned long long".
The limit was removed and parsing/init is less loosy.

Signed-off-by: Intel
11 years agoeal: minor changes
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
eal: minor changes

Signed-off-by: Intel
11 years agomk: combined library
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
mk: combined library

Allow to merge all libraries (shared or static) into one.

Signed-off-by: Intel
11 years agomk: shared libraries
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
mk: shared libraries

Allow to build shared libraries (.so) instead of static ones (.a).

Signed-off-by: Intel
11 years agomk: link with libm
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
mk: link with libm

Signed-off-by: Intel
11 years agodoc: whitespace changes in licenses
Intel [Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)]
doc: whitespace changes in licenses

Signed-off-by: Intel
11 years agoupdate version to 1.4.1
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
update version to 1.4.1

Signed-off-by: Intel
11 years agoexamples/ip_reassembly: various updates
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
examples/ip_reassembly: various updates

- postpone calls to rte_pktmbuf_free() when a mbuf is not used anymore
- add some tx statistics

Signed-off-by: Intel
11 years agoexamples/dpdk_qat: rework port discovery
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
examples/dpdk_qat: rework port discovery

Signed-off-by: Intel
11 years agoexamples/qos_sched: minor changes
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
examples/qos_sched: minor changes

Signed-off-by: Intel
11 years agoexamples/qos_sched: add --msz for mempool size
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
examples/qos_sched: add --msz for mempool size

Signed-off-by: Intel
11 years agoexamples/l3fwd-power: use DD bit rather than RX queue count
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
examples/l3fwd-power: use DD bit rather than RX queue count

Prefer use of rte_eth_rx_descriptor_done to rte_eth_rx_queue_count.

Signed-off-by: Intel
11 years agoixgbe: fix DCB setup
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ixgbe: fix DCB setup

Signed-off-by: Intel
11 years agoixgbe: check DD bit for specific RX descriptor
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ixgbe: check DD bit for specific RX descriptor

Signed-off-by: Intel
11 years agoigb: check DD bit of specific RX descriptor
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
igb: check DD bit of specific RX descriptor

Signed-off-by: Intel
11 years agoethdev: check DD bit of specific RX descriptor
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ethdev: check DD bit of specific RX descriptor

Signed-off-by: Intel
11 years agoixgbe: RX queue count is not implemented for VF
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ixgbe: RX queue count is not implemented for VF

It was introduced by mistake in version 1.4.0.

Signed-off-by: Intel
11 years agoixgbe: use DD bit to count RX available descriptors
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ixgbe: use DD bit to count RX available descriptors

Signed-off-by: Intel
11 years agoigb: use DD bit to count RX available descriptors
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
igb: use DD bit to count RX available descriptors

Signed-off-by: Intel
11 years agoethdev: fix doxygen comment for rte_eth_rx_queue_count
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
ethdev: fix doxygen comment for rte_eth_rx_queue_count

Signed-off-by: Intel
11 years agopci: check driver probe return code
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
pci: check driver probe return code

Signed-off-by: Intel
11 years agomem: rework huge page mapping for secondary process
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
mem: rework huge page mapping for secondary process

Signed-off-by: Intel
11 years agosched: only support TC 3 oversubscription
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
sched: only support TC 3 oversubscription

Signed-off-by: Intel
11 years agosched: add mtu parameter
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
sched: add mtu parameter

Signed-off-by: Intel
11 years agosched: bitmap is now dynamically allocated
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
sched: bitmap is now dynamically allocated

Signed-off-by: Intel
11 years agoeal: use intrinsic function
Intel [Mon, 22 Jul 2013 22:00:00 +0000 (00:00 +0200)]
eal: use intrinsic function

Signed-off-by: Intel
11 years agoupdate version to 1.4.0
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
update version to 1.4.0

Signed-off-by: Intel
11 years agoexamples/quota_watermark: initial import
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/quota_watermark: initial import

Signed-off-by: Intel
11 years agoexamples/ip_reassembly: initial import
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/ip_reassembly: initial import

Signed-off-by: Intel
11 years agoexamples/l3fwd-vf: release resources on SIGINT
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/l3fwd-vf: release resources on SIGINT

Signed-off-by: Intel
11 years agoexamples/l3fwd: various updates
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/l3fwd: various updates

Signed-off-by: Intel
11 years agoexamples/l2fwd: if no port configured, exit
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/l2fwd: if no port configured, exit

Signed-off-by: Intel
11 years agoexamples/vmdq_dcb: display port mac address
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/vmdq_dcb: display port mac address

Signed-off-by: Intel
11 years agoexamples/dpdk_qat: minor change
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/dpdk_qat: minor change

Signed-off-by: Intel
11 years agoexamples/dpdk_qat: fix cross compile check
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples/dpdk_qat: fix cross compile check

Signed-off-by: Intel
11 years agoexamples: work only on defined lcores
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples: work only on defined lcores

Signed-off-by: Intel
11 years agoexamples: time fixes
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples: time fixes

Signed-off-by: Intel
11 years agoexamples: use global RTE_MAX_ETHPORTS
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples: use global RTE_MAX_ETHPORTS

Signed-off-by: Intel
11 years agoexamples: numa updates
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
examples: numa updates

Signed-off-by: Intel
11 years agoapp/testpmd: update csumonly
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app/testpmd: update csumonly

Signed-off-by: Intel
11 years agoapp: fix build with GCC 4.8
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: fix build with GCC 4.8

GCC 4.8 was producing this error:
argument to ‘sizeof’ in ‘strncmp’ call is the same expression as the
second source; did you mean to provide an explicit length?
[-Werror=sizeof-pointer-memaccess]

Signed-off-by: Intel
11 years agoapp: only use one thread to run autotests
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: only use one thread to run autotests

Signed-off-by: Intel
11 years agoapp: fix build when some libs are disabled
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: fix build when some libs are disabled

Signed-off-by: Intel
11 years agoapp: rework ring tests
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: rework ring tests

Signed-off-by: Intel
11 years agoapp: add a test on mbuf alignment
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: add a test on mbuf alignment

Signed-off-by: Intel
11 years agoapp: add tests on --syslog, --no-shconf and --huge-dir flags
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: add tests on --syslog, --no-shconf and --huge-dir flags

Signed-off-by: Intel
11 years agoapp: add some tests
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: add some tests

Signed-off-by: Intel
11 years agoapp: remove pmac from Makefile
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: remove pmac from Makefile

Signed-off-by: Intel
11 years agoapp: fix Makefile
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
app: fix Makefile

Signed-off-by: Intel
11 years agokni: disable ETHTOOL_GRXRINGS
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
kni: disable ETHTOOL_GRXRINGS

Signed-off-by: Intel
11 years agokni: fix build with kernel 3.8
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
kni: fix build with kernel 3.8

- timecompare (used for hardware timestamping) has been removed.
(see Linux commit 65f8f9a1c1db831e5159e3e3e50912d1f214cd0c)
Simply disable HW_TIME_STAMP feature because it is not used by KNI.

- annotations __devinit and __devexit have been removed.
(see Linux commit 54b956b903607f8f8878754dd4352da6a54a1da2)

Signed-off-by: Intel
11 years agokni: fix multi-process support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
kni: fix multi-process support

Signed-off-by: Intel
11 years agoixgbe: force phy power up/down
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: force phy power up/down

Signed-off-by: Intel
11 years agoigb: force phy power up/down
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
igb: force phy power up/down

Signed-off-by: Intel
11 years agoixgbe: update VMDq/DCB support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: update VMDq/DCB support

Signed-off-by: Intel
11 years agoigb: update VMDq/DCB support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
igb: update VMDq/DCB support

Signed-off-by: Intel
11 years agoethdev: update VMDq/DCB support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: update VMDq/DCB support

Signed-off-by: Intel
11 years agoethdev: set VMDq pool when adding mac address
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: set VMDq pool when adding mac address

Signed-off-by: Intel
11 years agoixgbe: add PF support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: add PF support

Signed-off-by: Intel
11 years agoigb: add PF support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
igb: add PF support

Signed-off-by: Intel
11 years agoethdev: add PF support
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: add PF support

Signed-off-by: Intel
11 years agoixgbe: support dual vlan
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: support dual vlan

Signed-off-by: Intel
11 years agoigb: fix max RX packet size and support dual VLAN
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
igb: fix max RX packet size and support dual VLAN

When in 'normal' mode, hardware is designed to receive up to 1522 bytes.
When in 'jumbo' mode, RLPML register must be updated so that hardware accepts
a 802.1q vlan header. If dual vlan is enabled, then a second vlan header is
expected, so update RLPML register according to dual vlan support.

Signed-off-by: Intel
11 years agoixgbe: retrieve RX available descriptors
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: retrieve RX available descriptors

Signed-off-by: Intel
11 years agoigb: retrieve RX available descriptors
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (02:00 +0200)]
igb: retrieve RX available descriptors

Signed-off-by: Intel
11 years agoe1000: retrieve RX available descriptors
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (02:00 +0200)]
e1000: retrieve RX available descriptors

Signed-off-by: Intel
11 years agoethdev: retrieve RX available descriptors
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: retrieve RX available descriptors

Signed-off-by: Intel
11 years agoixgbe: RSS RETA configuration
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: RSS RETA configuration

Signed-off-by: Intel
11 years agoigb: RSS RETA configuration
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
igb: RSS RETA configuration

Signed-off-by: Intel
11 years agoethdev: RSS RETA configuration
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: RSS RETA configuration

Signed-off-by: Intel
11 years agoixgbe: allocate structures on numa_node
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: allocate structures on numa_node

Signed-off-by: Intel
11 years agoethdev: store numa_node per device
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ethdev: store numa_node per device

Signed-off-by: Intel
11 years agoixgbe: allow unsupported SFP
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: allow unsupported SFP

Add RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP build option

Signed-off-by: Intel
11 years agoixgbe: force inlining
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: force inlining

Signed-off-by: Intel
11 years agoixgbe: log tx code path
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
ixgbe: log tx code path

Signed-off-by: Intel
11 years agoe1000: move workaround for wthresh on 82576 at wrong place
Intel [Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)]
e1000: move workaround for wthresh on 82576 at wrong place

The workaround is moved in e1000em code but 82576 is an igb NIC.
It breaks the fix of the commit 7e9e49feea.

Signed-off-by: Intel <intel.com>
11 years agoigb: workaround errata with wthresh on 82576
Stephen Hemminger [Thu, 30 May 2013 17:12:35 +0000 (10:12 -0700)]
igb: workaround errata with wthresh on 82576

The 82576 has known issues which require the write threshold to be set to 1.
See:
http://download.intel.com/design/network/specupdt/82576_SPECUPDATE.pdf

If not then single packets will hang in transmit ring until more arrive.
Simple tests like ping will fail.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Reviewed-by: Vincent Jardin <vincent.jardin@6wind.com>