hash: add assembly implementation of CRC32 intrinsics
Added:
- crc32c_sse42_u32() emits 'crc32l' asm instruction;
- crc32c_sse42_u64() emits 'crc32q' asm instruction;
- crc32c_sse42_u64_mimic(), wrapper in case of run on 32-bit platform.
Signed-off-by: Yerden Zhumabekov <e_zhumabekov@sts.kz> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Jijiang Liu [Fri, 20 Feb 2015 17:01:45 +0000 (17:01 +0000)]
i40e: support NVGRE in Rx tunnel filtering
The filter types supported are listed below for NVGRE packet:
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> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Helin Zhang [Wed, 4 Feb 2015 07:16:33 +0000 (15:16 +0800)]
app/testpmd: support new rss offloads
RSS offloads supported 'ip' and 'udp' only, which did not demonstrate
all of the hardware capabilities. The modifications adds support of
new RSS offloads of 'tcp', 'sctp', 'ether' and 'all'.
Helin Zhang [Wed, 4 Feb 2015 07:16:32 +0000 (15:16 +0800)]
ethdev: unification of RSS offload types
RSS offload types were defined separately for 1/10G and 40G NICs,
and have no relationship with flow types. The modifications are to
unify all RSS offload types for all PMDs. Unified RSS offload types
have new and common names which can be used for any PMD or
applications, and decouple from specific hardwares.
Signed-off-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: merge with fm10k] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Helin Zhang [Wed, 4 Feb 2015 07:16:31 +0000 (15:16 +0800)]
ethdev: unification of flow types
Flow types was defined actually for i40e hardware specifically,
and wasn't able to be used for defining RSS offload types of all
PMDs. It removed the enum flow types, and uses macros instead
with new names. The new macros can be used for defining RSS
offload types later. Also modifications are made in i40e and
testpmd accordingly.
Signed-off-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: merge with new flow director API] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Helin Zhang [Wed, 4 Feb 2015 07:16:30 +0000 (15:16 +0800)]
ethdev: fix size of flow type mask array
It wrongly calculates the size of the flow type mask array. The fix
is to align the flow type maximum index ID with the number of
element bit width, and then divide the number of element bit width.
Jingjing Wu [Tue, 10 Feb 2015 04:48:32 +0000 (12:48 +0800)]
ethdev: remove old ntuple filter API
Following structures are removed:
- rte_2tuple_filter
- rte_5tuple_filter
Following APIs are removed:
- rte_eth_dev_add_2tuple_filter
- rte_eth_dev_remove_2tuple_filter
- rte_eth_dev_get_2tuple_filter
- rte_eth_dev_add_5tuple_filter
- rte_eth_dev_remove_5tuple_filter
- rte_eth_dev_get_5tuple_filter
It also move macros TCP_*_FLAG to rte_eth_ctrl.h, and removes the macro
TCP_UGR_FLAG which is duplicated with TCP_URG_FLAG.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
[Thomas: remove also from version map]
Jingjing Wu [Tue, 10 Feb 2015 04:48:29 +0000 (12:48 +0800)]
ixgbe: migrate ntuple filter to new API
This patch defines new functions dealing with ntuple filters which is
corresponding to 5tuple in HW.
It removes old functions which deal with 5tuple filters.
Ntuple filter is dealt with through entrance ixgbe_dev_filter_ctrl.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jingjing Wu [Tue, 10 Feb 2015 04:48:30 +0000 (12:48 +0800)]
igb: migrate ntuple filter to new API
This patch defines new functions dealing with ntuple filters which is
corresponding to 2tuple filter for 82580 and i350 in HW, and to 5tuple
filter for 82576 in HW.
It removes old functions which deal with 2tuple and 5tuple filters in igb driver.
Ntuple filter is dealt with through entrance eth_igb_filter_ctrl.
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jingjing Wu [Tue, 10 Feb 2015 04:48:28 +0000 (12:48 +0800)]
ethdev: new ntuple filter API
This patch defines ntuple filter type RTE_ETH_FILTER_NTUPLE and its structure rte_eth_ntuple_filter.
It also corrects the typo TCP_UGR_FLAG to TCP_URG_FLAG
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jingjing Wu [Wed, 11 Feb 2015 07:51:49 +0000 (15:51 +0800)]
ethdev: remove old syn filter API
Structure rte_syn_filter is removed.
Following APIs are removed:
- rte_eth_dev_add_syn_filter
- rte_eth_dev_remove_syn_filter
- rte_eth_dev_get_syn_filter
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: remove also from version map]
Jingjing Wu [Wed, 11 Feb 2015 07:51:48 +0000 (15:51 +0800)]
app/testpmd: new commands for syn filter
Following commands of syn filter are removed:
- add_syn_filter (port_id) priority (high|low) queue (queue_id)
- remove_syn_filter (port_id)
- get_syn_filter (port_id)
New command is added for syn filter by using filter_ctrl API and new
syn filter structure:
- syn_filter (port_id) (add|del) priority (high|low) queue (queue_id)
Jingjing Wu [Wed, 11 Feb 2015 07:51:46 +0000 (15:51 +0800)]
ixgbe: migrate syn filter to new API
This patch defines new functions dealing with syn filter.
It removes old functions which deal with syn filter.
Syn filter is dealt with through entrance ixgbe_dev_filter_ctrl.
Jingjing Wu [Wed, 11 Feb 2015 07:51:47 +0000 (15:51 +0800)]
igb: migrate syn filter to new API
This patch defines new functions dealing with syn filter.
It removes old functions of syn filter in igb driver.
Syn filter is dealt with through entrance eth_igb_filter_ctrl.
Jingjing Wu [Sat, 21 Feb 2015 01:53:10 +0000 (01:53 +0000)]
ethdev: remove old flex filter API
Structure rte_flex_filter is removed.
Following APIs are removed:
- rte_eth_dev_add_flex_filter
- rte_eth_dev_remove_flex_filter
- rte_eth_dev_get_flex_filter
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
[Thomas: remove also from version map]
Jingjing Wu [Sat, 21 Feb 2015 01:53:09 +0000 (01:53 +0000)]
app/testpmd: new commands for flex filter
Following commands of flex filter are removed:
- add_flex_filter (port_id) len (len_value) bytes (bytes_string) mask (mask_value)
priority (prio_value) queue (queue_id)
- remove_flex_filter (port_id) index (idx)
- get_flex_filter (port_id) index (idx)
New command is added for flex filter by using filter_ctrl API and new flex filter structure:
- flex_filter (port_id) (add|del) len (len_value) bytes (bytes_value) mask (mask_value)
priority (prio_value) queue (queue_id)
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Jingjing Wu [Sat, 21 Feb 2015 01:53:08 +0000 (01:53 +0000)]
igb: migrate flex filter to new API
This patch defines new functions dealing with flex filter.
It removes old functions of flex filter in igb driver.
Syn filter is dealt with through entrance eth_igb_filter_ctrl.
Jingjing Wu [Thu, 29 Jan 2015 05:29:18 +0000 (13:29 +0800)]
ixgbe: support new flow director masks
This patch implement the mask configuration of flow director filter,
by using the mask defined in rte_fdir_conf instead of callback function
fdir_set_masks.
Jingjing Wu [Thu, 29 Jan 2015 05:29:11 +0000 (13:29 +0800)]
ixgbe: migrate flow director filtering to new API
This patch changes the add/delete/update operations to be implemented through
filter_ctrl API and RTE_ETH_FILTER_ADD/RTE_ETH_FILTER_DELETE/RTE_ETH_FILTER_UPDATE ops.
It also removes the callback functions:
- ixgbe_eth_dev_ops.fdir_add_signature_filter
- ixgbe_eth_dev_ops.fdir_update_signature_filter
- ixgbe_eth_dev_ops.fdir_remove_signature_filter
- ixgbe_eth_dev_ops.fdir_add_perfect_filter
- ixgbe_eth_dev_ops.fdir_update_perfect_filter
- ixgbe_eth_dev_ops.fdir_remove_perfect_filter
Danny Zhou [Fri, 20 Feb 2015 16:59:15 +0000 (16:59 +0000)]
eal/linux: enable uio_pci_generic support
Change the EAL PCI code so that it can work with both the
uio_pci_generic in-tree driver, as well as the igb_uio
DPDK-specific driver.
This involves changes to
1) Modify method of retrieving BAR resource mapping information
2) Mapping using resource files in /sys rather than /dev/uio*
2) Setup bus master bit in NIC's PCIe configuration space for
uio_pci_generic.
Signed-off-by: Danny Zhou <danny.zhou@intel.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Maciej Gajdzica [Fri, 20 Feb 2015 16:09:23 +0000 (17:09 +0100)]
app/test: add unit tests for link bonding mode 6
Added 4 unit tests checking link bonding mode 6 behavior.
Also modified virtual_pmd so it is possible to provide packets,
that should be received with rx_burst and to inspect packets
transmitted by tx_burst.
In packet_burst_generator.c function creating eth_header is
modified, so it accepts ether_type as a parameter and function
creating arp_header is added. Updated other unit tests to get
rid of compilation errors.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Daniel Mrzyglod [Fri, 20 Feb 2015 16:09:22 +0000 (17:09 +0100)]
bond: rename mode 5
This patch modify mode older name from
BONDING_MODE_ADAPTIVE_TRANSMIT_LOAD_BALANCING to BONDING_MODE_TLB
This patch also changes order of TEST_ASSERT macro in
test_tlb_verify_slave_link_status_change_failover.
Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
examples/bond: add example application for link bonding mode 6
This patch contains an example for link bonding mode 6.
It interact with user by a command prompt. Available commands are:
Start - starts ARP_thread which respond to ARP_requests and sends
ARP_updates (this
Is enabled by default after startup),
Stop -stops ARP_thread,
Send count ip - send count ARP requests for IP,
Show - prints basic bond information, like IPv4 statistics from clients
Help,
Quit.
The best way to test mode 6 is to use this example together with
previous patch:
[PATCH 3/4] bond: add debug info for mode 6 link bonding.
Connect clients thru switch to bonding machine and send:
arping -c 1 bond_ip or
generate IPv4 traffic to bond_ip (IPv4 traffic from different clients
should be then balanced on slaves in round robin manner).
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com> Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
This patch add some debug information when using link bonding mode 6.
It prints basic information about ARP packets on RX and TX (MAC, ip,
packet number, arp packet type).
If CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB == y.
If CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1 is enabled instead of previous
one, use show command to see IPv4 balancing from clients.
Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Maciej Gajdzica [Fri, 20 Feb 2015 16:09:19 +0000 (17:09 +0100)]
bond: add mode 6
This mode includes adaptive TLB and receive load balancing (RLB). In RLB
the bonding driver intercepts ARP replies send by local system and
overwrites its source MAC address, so that different peers send data to
the server on different slave interfaces. When local system sends ARP
request, it saves IP information from it. When ARP reply from that peer
is received, its MAC is stored, one of slave MACs assigned and ARP reply
send to that peer.
Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com> Signed-off-by: Michal Jastrzebski <michalx.k.jastrzebski@intel.com> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Maciej Gajdzica [Fri, 20 Feb 2015 16:09:18 +0000 (17:09 +0100)]
net: change arp header struct declaration
Changed MAC address type from uint8_t[6] to struct ether_addr and IP
address type from uint8_t[4] to uint32_t to make it consistent with
other DPDK code using MAC and IP addresses. It allows us to use
is_same_ether_addr and ether_addr_copy functions on MAC addresses in ARP header. Also
removed union from arp_hdr struct to make calls to arp_data items
shorter. Updated test-pmd to match new arp_hdr version.
This makes virtio driver work like ixgbe. Transmit buffers are
held until a transmit threshold is reached. The previous behavior
was to hold mbuf's until the ring entry was reused which caused
more memory usage than needed.
Change order of initialization to match Linux kernel.
Don't blow away control queue by doing reset when stopped.
Calling dev_stop then dev_start would not work.
Dev_stop was calling virtio reset and that would clear all queues
and clear all feature negotiation.
Resolved by only doing reset on device removal.
It is helpful to allow device drivers that don't support hardware
VLAN stripping to emulate this in software. This allows application
to be device independent.
Avoid discarding shared mbufs. Make a copy in rte_vlan_insert() of any
packet to be tagged that has a reference count > 1.
Updating the vring descriptor index should be done before notifying host;
Remove 2 duplicated store memory barriers in both Rx and Tx path because there is
store memory barrier in vq_update_avail_idx function;
Notify the host only if packets actually transmitted(nb_tx > 0).
The DPDK driver only has to deal with the case of running on PCI
and with SMP. In this case, the code can use the weaker barriers
instead of using hard (fence) barriers. This will help performance.
The rationale is explained in Linux kernel virtio_ring.h.
To make it clearer that this is a virtio thing and not some generic
barrier, prefix the barrier calls with virtio_.
Add missing (and needed) barrier between updating ring data
structure and notifying host.
Panu Matilainen [Thu, 19 Feb 2015 11:21:10 +0000 (13:21 +0200)]
i40e: fix build with gcc 5
Eliminate ambiguity in the condition which trips up a "logical not
is only applied to the left..." warning from gcc 5, causing build
failure with -Werror. Besides non-ambiguous, the condition is
far more obvious this way.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
When the vector pmd was receiving a mix of packets of various sizes,
some of which were split across multiple mbufs, there was an issue
with reassembly of the jumbo frames. This was due to a skipped increment
when using "continue" in a while loop. Changing the loop to a "for"
loop fixes this problem, by ensuring the increment is always performed.
Reported-by: Prashant Upadhyaya <praupadhyaya@gmail.com> Reported-by: Martin Weiser <martin.weiser@allegro-packets.com> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Martin Weiser <martin.weiser@allegro-packets.com>
Olivier Matz [Wed, 4 Feb 2015 09:49:25 +0000 (10:49 +0100)]
cmdline: fix check in port list parsing
The argument ressize contains the size of the result buffer which
should be large enough to store the parsed result of a token. In
this case, it should be larger or equal to sizeof(cmdline_portlist_t)
(4 bytes), not PORTLIST_TOKEN_SIZE which is the max size of the token
string.
This is not a critical, it fixes cases where the total length of the
parsed instruction is greater than the maximum.
Daniel Mrzyglod [Thu, 13 Nov 2014 12:01:31 +0000 (12:01 +0000)]
mk: support x32 ABI
x32 ABI provides benefits of x86-64 while using 32-bit pointers and
avoiding overhead of 64-bit pointers.
Test report: http://dpdk.org/ml/archives/dev/2015-February/012599.html
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Tested-by: Haifeng Tang <haifengx.tang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tomasz Kulasek [Fri, 13 Feb 2015 10:38:16 +0000 (11:38 +0100)]
bond: fix symbol export
rte_eth_bond_8023ad_setup and rte_eth_bond_8023ad_conf_get entries need
to be exported to be used by test application for shared libraries
compilation.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 13 Feb 2015 10:38:15 +0000 (11:38 +0100)]
app/test: link with ring pmd when needed
This patch links test application against librte_pmd_ring.so for shared
libraries. It's required as long as librte_pmd_ring provides some additional
routines used for testing purposes and must be "hard-linked".
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
Tomasz Kulasek [Fri, 13 Feb 2015 10:38:14 +0000 (11:38 +0100)]
app/test: unit tests for bonding mode 4
This patch adds unit tests for mode 4. It is split into separate
file to avoid problems with other modes that does not need to
look into packets payload.
This patch includes also a modification of maximum number of ports
used in their tests for bonding modes 0-3 from 16 to 6.
Jia Yu [Fri, 7 Nov 2014 17:31:51 +0000 (09:31 -0800)]
ethdev: return status of stats read
rte_eth_stats_get is to get physical device statistics. Without
return status, caller does not know whether function fails or not
(i.e. invalid port_id, driver has no stats_get callback). Caller
cannot differiente normal 0 stats or error case. This fix adds
a return status to the function.
Jia Yu [Fri, 7 Nov 2014 17:31:50 +0000 (09:31 -0800)]
ethdev: update link status after start
Since LSR interrupt is disabled by pmd drivers, link status in rte_eth_device is always down.
Bond slave_configure() enables LSR interrupt on devices to get notification if link status
changes. However, the LSC interrupt at device start time is still lost.
In this fix, call link_update to read link status from hardware
register at device start time.
This new app makes use of the librte_reorder library.
It requires at least 3 lcores for RX, Workers (1 or more) and TX threads.
Communication between RX-Workers and Workers-TX is done by using rings.
The flow of mbufs is the following:
* RX thread gets mbufs from driver, set sequence number and enqueue
them in ring.
* Workers dequeue mbufs from ring, do some 'work' and enqueue mbufs in
ring.
* TX dequeue mbufs from ring, inserts them in reorder buffer, drains
mbufs from reorder and sends them to the driver.
David Marchand [Fri, 13 Feb 2015 15:03:14 +0000 (16:03 +0100)]
devargs: remove limit on parameters length
As far as I know, there is no reason why we should have a limit on the length of
parameters that can be given for a device.
Remove this limit by using dynamic allocations.
Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>