Commit Graph

2990 Commits

Author SHA1 Message Date
Fan Zhang
7b46f62b81 crypto/scheduler: fix capability update
Fixes: 31439ee72b ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
2017-04-20 11:32:45 +02:00
Arek Kusztal
9d0748d2de crypto/qat: fix capabilities for D15xx device
This commit fixes capabilities for Intel(R) QuickAssist
Technology D15xx device

Fixes: 259310f3a9 ("crypto/qat: support device D15xx")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2017-04-20 11:32:45 +02:00
Gowrishankar Muthukrishnan
e4701c7a4e net/i40e: fix build on ppc64le
A typo introduced in i40e_rxtx_vec_altivec.c

Fixes: 67f0380766 ("net/i40e: enable per-device packet type mapping")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
2017-04-20 10:21:59 +02:00
Bruce Richardson
2e516d18dc event/sw: fix events mis-identified as needing reorder
When taking events from a port, we checked the history list to check if the
event needed to be put back in order i.e. originally came from a reordered
queue type. The check for reordering involved checking if the reorder
buffer entry pointer was null. However, after that pointer was used it was
never cleared to null again.

This caused problems when we had mixed reordered and atomic or parallel
events, as the events from the latter two queue types were misidentified as
needing reordering. This let in some cases to crashes, but mostly led to
dropping events, and then application lock-up.

Fixes: 617995dfc5 ("event/sw: add scheduling logic")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-04-20 00:30:04 +02:00
Harry van Haaren
95a896ab86 event/sw: fix credit return on invalid queue id
This patch returns a credit when an rte_event is
enqueued with an invalid queue_id. Previously a
credit was leaked from the system.

Note that the eventdev instance does not attempt
to free any resources that the rte_event owns. As
a result, resources owned by the rte_event are leaked.
Eg. if the rte_event represents an rte_mbuf, the mbuf
will not be freed, and causes a leak from the mempool.

Fixes: 656af91800 ("event/sw: add worker core functions")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
2017-04-20 00:26:55 +02:00
Harry van Haaren
7904c82a78 event/sw: fix hashing of flow on ordered ingress
The flow id of packets was not being hashed on ingress
on an ordered queue. Fix by applying same hashing as is
applied in the atomic queue case. The hashing itself is
broken out into a macro to avoid duplication of code.

Fixes: 617995dfc5 ("event/sw: add scheduling logic")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2017-04-20 00:24:50 +02:00
Zhiyong Yang
b7be4f461a net/virtio: support to turn on/off traffic flow
Current virtio_dev_stop only disables interrupt and marks link down,
When it is invoked, tx/rx traffic flows still work. This is a strange
behavior. The patch supports the switch of flow.

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
2017-04-19 10:49:06 +02:00
Jianfeng Tan
260aae9ad9 net/virtio-user: fix address on 32-bit system
virtio-user cannot work on 32-bit system as higher 32-bit of the
addr field (64-bit) in the desc is filled with non-zero value
which should not happen for a 32-bit system.

In case of virtio-user, we use buf_addr of mbuf to fill the
virtqueue desc addr. This is a regression bug. For 32-bit system,
the first 4 bytes of mbuf is buf_addr, with following 8 bytes for
buf_phyaddr. With below wrong definition, both buf_addr and lower
4 bytes buf_phyaddr are obtained to fill the virtqueue desc.
  #define VIRTIO_MBUF_ADDR(mb, vq) \
	(*(uint64_t *)((uintptr_t)(mb) + (vq)->offset))

Fixes: 25f80d1087 ("net/virtio: fix packet corruption")
Cc: stable@dpdk.org

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Jianfeng Tan
cc4690e980 net/virtio-user: fix link status
Previously, we miss to set intr_handle->fd which will be used as
target file for epoll to check LSC.

As a result, stdin (0) is used and intr thread keeps busy whenever
data comes from stdin.

To fix this, we use vhostfd as the target file for epoll to check
the link status change events. And we move intr_handle initialization
after vhost backend settup to make sure vhostfd is initialized.

Fixes: 35c4f85548 ("net/virtio-user: support to report net status")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Yuanhan Liu
aa9f060617 net/virtio: fix link status always being up
The virtio port link status will always be UP, even the port is stopped:

    testpmd> port stop 0
    Stopping ports...
    Checking link statuses...
    Port 0 Link Up - speed 10000 Mbps - full-duplex
    Done

The link status is queried by link_update callback when LSC is disabled.
Which in turn queries the "status" field.  However, the "status" is
read-only. I couldn't think of some proper ways to change the status
without doing device reset.

Instead of doing (the heavy) reset at stop, this patch introduced a flag,
which is set to 1 and 0 on start and stop, respectively. When it's set to
0, the link status is set to DOWN unconditionally.

Fixes: a85786dc81 ("virtio: fix states handling during initialization")
Cc: stable@dpdk.org

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Jianfeng Tan
4bf9e26d29 net/virtio-user: fix net status report
We only enabled LSC when using vhost-user as the backend, but it is
reported even when using vhost-kernel as the backend.

Fix it by only reportting LSC support when using vhost-user as the
backend.

Fixes: 35c4f85548 ("net/virtio-user: support to report net status")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
2017-04-19 10:49:06 +02:00
Jianfeng Tan
bed3b24c87 net/virtio-user: fix feature negotiation
The feature negotiation in virtio-user is proven to be broken,
which results in device initialization failure.

Originally, we get features from vhost backend, and remove those
that are not supported. But when new feature is added, for example,
VIRTIO_NET_F_MTU, we fail to remove this new feature. Then, this
new feature will be negotiated, as both frontend and backend claim
to support this feature.

To fix it, we add a macro to record supported features, as a filter
to remove newly added features.

Fixes: 37a7eb2ae8 ("net/virtio-user: add device emulation layer")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Sagar Abhang
912be9daf4 net/vhost: stop dev in close and address mem leak
Move the call to stop the device inside the close routine because close
needs to stop the device if it isn't stopped.

Free the allocated queue buffers in close instead of doing so in remove.
Original code had these clean ups in remove which was causing memory
leak.

Signed-off-by: Sagar Abhang <sabhang@brocade.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Xiao Wang
518208f3a1 net/virtio: fix queue notify
According to spec, we should write virtqueue index into the notify
address, rather than 1. Besides, some HW backend may rely on the data
written to identify which queue need to serve.

Fixes: 6ba1f63b5a ("virtio: support specification 1.0")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2017-04-19 10:49:06 +02:00
Shahaf Shuler
2dfbbd925d net/mlx5: fix parameters defaults
With the Enhanced multi packet send addition, the defaults were made
in order to get the maximum out of the box performance.
Features like tso, don't use the enhanced send, however the defaults
are still valid. This cause Tx queue creation to fail.

Fixes: 3f13f8c23a ("net/mlx5: support hardware TSO")
Fixes: 6ce84bd889 ("net/mlx5: add enhanced multi-packet send for ConnectX-5")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-19 15:37:37 +02:00
Shahaf Shuler
50b244a179 net/mlx5: rework parameters parsing
Currently the argument process is done without indication which
parameter was forced by the application and which one is on it
default value.
This becomes problematic when different features requires different
defaults. For example, Enhanced multi packet send and TSO.

This commit modifies the argument process, enabling to differ
which parameter was forced by the application.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-19 15:37:37 +02:00
Shijith Thotton
25b156087e net/liquidio: support 25G link speed
Add case to handle 25G link speed and thereby support
LiquidIO II CN23XX 225SV (2x25G) adapter.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Beilei Xing
55873ac03b net/i40e: add check for invalid VF queue number
Add check to avoid invalid VF queue number is used in
tunnel filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-04-19 15:37:37 +02:00
Andrew Rybchenko
4c7f9729dd net/sfc: correct RSS hash availability condition
RSS hash is computed by hardware if corresponding Rx filter (for
example, default Rx filters) has RSS flag set which is set if
the number of RSS channels is greater than zero.

Fixes: 4ec1fc3ba8 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-19 15:37:37 +02:00
Andrew Rybchenko
63ab5e0c8f net/sfc: use zero RSS channels as disabled RSS indicator
Enabled RSS enables RSS hash computation and provision in pseudo header.
It still makes sense for applications even if only one Rx queue is used.

Fixes: 4ec1fc3ba8 ("net/sfc: add basic stubs for RSS support on driver attach")
Fixes: 088e17210a ("net/sfc: query RSS key and hash types config")
Fixes: 82faef5076 ("net/sfc: set RSS key and hash types config")
Fixes: af0d931797 ("net/sfc: query RSS redirection table")
Fixes: 32bcfb0a50 ("net/sfc: update RSS redirection table")
Fixes: f5258439ee ("net/sfc: avoid failure on port start if Rx mode is rejected")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-19 15:37:37 +02:00
Andrew Rybchenko
2617ec3f64 net/sfc: reset RSS channels back to 0 on close
Fixes: 4ec1fc3ba8 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-19 15:37:37 +02:00
Andrew Rybchenko
8e07acbb12 net/sfc: remove logically dead code
Coverity issue: 1419717
Fixes: a9825ccf5b ("net/sfc: support flow API filters")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-19 15:37:37 +02:00
Nélio Laranjeiro
30788c5510 net/mlx5: fix empty RSS flow action
Empty RSS action is causing a segmentation fault.

Fixes: 3d821d6fea ("net/mlx5: support RSS action flow rule")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Yongseok Koh
ab76eab38a net/mlx5: change calculating inline room for Tx
Current implementation is error-prone if the max inline size
(txq->max_inilne) is decoupled from txq->inline_en and becomes zero. If it
becomes zero, HW can crash due to WQ overflow.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
6b7ce3c732 net/i40e: downgrade error log
When deleting the default MAC VLAN filter, it's
expected that it may fail.
So downgrade the error print from warning to
debug.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Bernard Iremonger
84760abf12 net/i40e: downgrade log message
Change level of log message from ERR to DEBUG and reword it,
in the i40e_dev_consistent_tunnel_filter_set() function.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-04-19 15:37:37 +02:00
Bernard Iremonger
b6e2e78f5d net/i40e: ensure vector mode is not used with QinQ
In rx vector mode, QinQ is not supported.
When hw_vlan_extend is set for QinQ ensure that
rx vector mode is not selected.

Fixes: 8e109464c0 ("i40e: allow vector Rx and Tx usage")
Cc: stable@dpdk.org

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Jerin Jacob
5c7ccb263b net/thunderx: reduce writes to mbuf
With the mbuf rework, we now have 8 contiguous bytes to be
rearmed in the mbuf at 8B naturally aligned address.
Use single 8B write to avoid multiple 2B writes in Rx path.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
e130425300 net/i40e: downgrade unnecessary error log
When receiving the unsupported AQ messages, it's taken as
an error. It's not appropriate and triggers too much
unnecessary print.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Charles Myers
1193edaa82 net/mlx4: fix Rx after mbuf alloc failure
Fixes issue where mlx4 driver stops receiving packets when mbuf
allocation fails in mlx4_rx_burst().

This issue appears to be caused because the code doesn't recycle the
existing mbuf to the sges array when mbuf allocation fails as is done
in the code right above it which handles (wc.status != IBV_WC_SUCCESS).

Copying the code from the above case fixes the issue.

Fixes: acac55f164 ("mlx4: use MOFED 3.0 fast verbs interface for Rx operations")
Cc: stable@dpdk.org

Signed-off-by: Charles Myers <charles.myers@spirent.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Ilya Maximets
c32c2c06bc net/bonding: allow configuring jumbo frames without slaves
Currently, 'rte_eth_dev_configure' fails on attempt to setup
max_rx_pkt_len > 2048 if no slaves was added to bonded device.

For example:

	rte_eth_dev_attach("eth_bond0,slave=05:00.0,mode=l34", &id)
	conf.rxmode.jumbo_frame = 1;
	conf.rxmode.max_rx_pkt_len = 9000;
	rte_eth_dev_configure(id, 1, 1, &conf)

Result:
	EAL: Initializing pmd_bond for eth_bond0
	EAL: Create bonded device eth_bond0 on port 4 in mode 2 on socket 0.
	rte_eth_dev_configure: ethdev port_id=4 \
		max_rx_pkt_len 9018 > max valid value 2048

It's expected that slaves will be added to bonded device inside
'rte_eth_dev_configure' and proper 'max_rx_pktlen' configured
for all of them.

Failure happens because of hardcoded low value of 'max_rx_pktlen'.
Increasing of this value to ETHER_MAX_JUMBO_FRAME_LEN will allow
above scenario (attach + configure).

It is important because it is the way OVS wants to work with
all DPDK devices (including virtual).
Changing the default hardcoded value makes no harm because
all the slaves' related code uses only 'candidate_max_rx_pktlen'
variable.

Fixes: 6cfc6a4f0d ("net/bonding: inherit maximum Rx packet length")
CC: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Eric Kinzie <ehkinzie@gmail.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-19 15:37:37 +02:00
Ilya Maximets
01c0eae742 net/bonding: remove all slaves on close
Some applications like OVS knows nothing about the
device type and wants to use same API to work with
all of them. But bond_pmd, unlike other pmds, requires
additional step (removing of all the slaves) before
closing the device.

In fact that bond_pmd automatically adds all the
devices from kvargs to bonding on configuration it
also should remove all of them on close.

This change is intended to have the same API for physical
and virtual devices. It allows us to handle virtual
devices in OVS in a common way.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-19 15:37:37 +02:00
Wei Zhao
c29315b87d net/ixgbe: remove tpid check for flow director
DPDK community has several emails discussion on this topic,
these mails link is bellow:
http://dpdk.org/ml/archives/dev/2017-March/060379.html,
http://dpdk.org/ml/archives/dev/2017-March/060295.html,

items like VLAN can already have several valid "types"
(0x88a8, 0x8100, 0x9100), and who knows what will come up
in the future.

And ixgbe_flow just ignores the types when do filter configuration.
So it may be reasonable to delete the related tpid check process.

Also add some more comment log on stack explanation.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-19 15:37:37 +02:00
Ferruh Yigit
97c5fbf6a4 net/ixgbe: fix duplicated check
Same check duplicated, updated check according what commend states.

Coverity issue: 1407507
Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-19 15:37:37 +02:00
Nélio Laranjeiro
3b57c21ef9 net/mlx5: panic when destroying a queue in use
Since the queue release API does not allow failures (return value is void)
and the flow API does not allow a queue to be released as long as a flow
rule depends on it, the only rational decision to avoid undefined behavior
is to panic in this situation.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Nélio Laranjeiro
c5b723ec8e net/mlx5: fix flow queues array allocation
Flow queues array offset is not properly computed causing all sorts of
issues.  Address it by making the rte_flow structure less complex.

Fixes: 360663e1df ("net/mlx5: prepare support for RSS action rule")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
7c59dbd5db net/i40e: fix VF link status update
VF link status rely on PF's notification, so when PF link status
be updated, it should notify VF to update link status also.
Current implementation only cover part of the situation when PF's link
status is updated, call i40e_notify_all_vfs_link_status in
i4e_dev_link_update will cover all situationa.

Fixes: bb6722fb5c ("net/i40e: fix VF bonded device link down")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
62e94f7f66 net/i40e: configure packet type mapping
The patch adds 4 APIs to support configurable
PTYPE mapping for i40e device.
rte_pmd_i40e_ptype_mapping_get.
rte_pmd_i40e_ptype_mapping_replace.
rte_pmd_i40e_ptype_mapping_reset.
rte_pmd_i40e_ptype_mapping_update.
The mapping from hardware defined packet type to software defined packet
type can be updated/reset/read out with these APIs.
Also a software ptype with the most significent bit set will be regarded
as a user defined ptype (RTE_PMD_I40E_PTYPE_USER_DEFINE_MASK) so
application can use it to defined its own PTYPE naming system.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-04-19 15:37:37 +02:00
Qi Zhang
67f0380766 net/i40e: enable per-device packet type mapping
The mapping from hardware defined packet type to software defined
packet type is static for i40e device, the patch let each ethdev to
to have their own copy of mapping table, this give the possibility
that different ethdev can be set different PTYPE mapping rule which
is the requirement to support following hardware's dynamic PTYPE
feature.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-04-19 15:37:37 +02:00
Wei Zhao
c306ee121a net/ixgbe: fix generic filter return
Fix generic filter return info is not readable
when repeat to create a rule.

Fixes: 72c135a89f ("net/ixgbe: create consistent filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
0011c82628 net/i40e: add more explanation for QoS APIs
According to HW implementation, the bandwidth of QoS
means the L2 bandwidth, not count the bytes added by
physical layer.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Ferruh Yigit
3a89f00b7d net/kni: remove unnecessary null check
Coverity issue: 1419721
Fixes: 75e2bc54c0 ("net/kni: add KNI PMD")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3cf50ff535 net/dpaa2: enable frame queue based dequeuing
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
1261cd68e3 net/dpaa2: enable DMA mapping during device scanning
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
0325150fd2 net/dpaa2: enable physical addressing for packet buffers
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
9e5f3e6d36 net/dpaa2: handle non-hardware backed buffer pool
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
37529eced4 net/dpaa2: enable stashing for LS2088A devices
As the hardware determines which core will process which packet,
performance is boosted by direct cache warming/stashing as well
as by providing biasing for core-to-flow affinity, which ensures
that flow-specific data structures can remain in the core’s cache.

This patch enables the one cache line data stashing for packet
annotation data and packet context

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
b0aa5459db net/dpaa2: support basic stats
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
c56c86ff87 net/dpaa2: update link status
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
a5fc38d422 net/dpaa2: support Rx packet parsing
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
cd9935cec8 net/dpaa2: enable Rx and Tx operations
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
e31d4d214e net/dpaa2: support MTU configuration
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
c0e5c69a3a net/dpaa2: support promiscuous mode
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
ef18dafef4 net/dpaa2: support L3 and L4 checksum offload
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
bee61d863e net/dpaa2: attach the buffer pool to dpni
This patch configures a MC-DPNI based DPAA2 PMD network
port with a DPBP based buffer pool.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
33fad4326c net/dpaa2: configure MAC address at init
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
89c2ea8f54 net/dpaa2: add RSS flow distribution
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3e5a335d3f net/dpaa2: add basic operations
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
e6b82573f6 net/dpaa2: support MC dpni object
This patch add support for dpni object support in MC driver.

DPNI represent a network interface object in DPAA2.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d401ead13f net/dpaa2: support debug log
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
c147eae01c net/dpaa2: introduce NXP DPAA2 driver
add support for fsl-mc bus based dpaa2 pmd driver.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
5dc43d22b5 mempool/dpaa2: add hardware offloaded mempool
DPAA2 Hardware Mempool handlers allow enqueue/dequeue from NXP's
QBMAN hardware block.
CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS is set to 'dpaa2', if the pool
is enabled.

This memory pool currently supports packet mbuf type blocks only.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
a0d5c9caf0 bus/fslmc: add frame queue based dq storage
This patch adds generic functions for allowing dq storage
for the frame queues.
As the frame queues are common resource for different drivers
this is helpful.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
352db38111 bus/fslmc: support DMA mapping for ARM SMMU
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
df0011c923 bus/fslmc: add physical-virtual address translation helpers
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d64abecf57 bus/fslmc: add packet FLE definitions
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3d6a286ca6 bus/fslmc: define VLAN header length
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d08e662a4b bus/fslmc: introduce true and false macros
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
beb2a7865d bus/fslmc: define hardware annotation area size
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
73cddc740c bus/fslmc: define queues for DPAA2 devices
Before DPAA2 devices can communicate using hardware queues, this patch
adds queue definitions in the FSLMC bus which the DPAA2 devices would
instantiate.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
d93818e1d1 bus/fslmc: affine dpio to crypto threads
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3981b74fc7 bus/fslmc: support hardware mempool object
Each mempool instance is represented by a DPBP object
from the FSL-MC bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
5374e50f10 bus/fslmc: add dpio portal driver
The portal driver is bound to DPIO objects discovered on the fsl-mc bus and
provides services that:
- allow other drivers, such as the Ethernet driver, to enqueue and dequeue
  frames for their respective objects

A system will typically allocate 1 DPIO object per CPU to allow queuing
operations to happen simultaneously across all CPUs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
52d4f4c765 bus/fslmc: support debug log
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
14ec4ddd2e bus/fslmc: scan for net and crypto device
This patch will add support in fslmc vfio process to
scan and parse the dpni and dpseci object for net and crypto
devices. It will add the scanned devices to the fslmc bus.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
70e58cf74c bus/fslmc: support VFIO
Add support for using VFIO for dpaa2 based fsl-mc bus.

There are some differences in the way vfio used for fsl-mc bus
from the eal vfio.
 - The scanning of bus for individual objects on the basis of
   the DPRC container.
 - The use and mapping of MC portal for object access

With the evolution of bus model, they can be further aligned with
eal vfio code.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
7ee4686401 bus/fslmc: support MC dpbp object
DPBP object represent a hw based buffer pool instance
in the DPAA2 hardware.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
2c63db040e bus/fslmc: support MC dpio object
This patch adds the DPIO object support in MC driver.

DPIO - Data Path Input Output represent the processing
context to access the QBMAN HW for packet I/O.

Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
3af733ba8d bus/fslmc: introduce MC object functions
This patch introduces the DPAA2 MC(Management complex Driver).

This is a minimal set of low level functions to send and
receive commands to the fsl-mc. It includes support for basic
management commands and commands to manipulate MC objects.

This is common to be used by various DPAA2 PMDs. e.g.net, crypto
and other drivers.

This is a low level library also used in kernel.

Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
531b17a780 bus/fslmc: add QBMAN driver to bus
QBMAN, is a hardware block which interfaces with the other
accelerating hardware blocks (For e.g., WRIOP) on NXP's DPAA2
SoC for queue, buffer and packet scheduling.

This patch introduces a userspace driver for interfacing with
the QBMAN hw block.

The qbman-portal component provides APIs to do the low level
hardware bit twiddling for operations such as:
  -initializing Qman software portals
  -building and sending portal commands
  -portal interrupt configuration and processing

This same/similar code is used in kernel and compat file is used
to make it working in user space.

Signed-off-by: Geoff Thorpe <geoff.thorpe@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Hemant Agrawal
7e7df6d0a4 bus/fslmc: introduce fsl-mc bus driver
The fslmc bus driver is a rte_bus driver which scans the fsl-mc bus
for NXP DPAA2 SoCs.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-19 15:37:37 +02:00
Michal Krawczyk
bc5ef57d43 net/ena: calculate partial checksum if DF bit is disabled
When TSO is disabled we still have to calculate partial checksum if DF bit
if turned off. This is caused by firmware bug.

First of all, we must make sure that we are dealing with IPV4 packet.
If not, we will just skip further checking of this packet and move to
the next one.

If application will not set m2_len field, we assume we that it was Ethernet
frame because we have to look inside the packet to check for the DF flag.
To make it work properly, PMD is assuming that before sending
packet application called function rte_eth_tx_prepare().

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
2017-04-19 15:37:37 +02:00
Michal Krawczyk
2732e07ad1 net/ena: cleanup if refilling of Rx descriptors fails
If wrong number of descriptors for refilling was passed to the Rx
repopulate function, there was memory leak which caused memory pool to
run out of resources in longer go.

In case of fail when refilling Rx descriptors, all additional mbufs
have to be released.

Fixes: 1173fca25a ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
2017-04-19 15:37:37 +02:00
Michal Krawczyk
ec78af6bc0 net/ena: fix delayed cleanup of Rx descriptors
On RX path, after receiving bunch of packets, variable tracking
available descriptors in HW queue was not updated.

To fix this issue, variable tracking used descriptors must be updated
after receiving packets - it must be reduced by the amount of received
descriptors in current batch.

Additionally, variable next_to_clean in rx_ring must be updated before
entering ena_populate_rx_queue() to keep it up to date with the current
ring state.

Fixes: 1daff5260f ("net/ena: use unmasked head and tail")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
2017-04-19 15:37:37 +02:00
Michal Krawczyk
a467e8f37a net/ena: fix Rx descriptors allocation
When application tried to allocate 1024 descriptors, device was not
initializing properly.

This patch solves it by avoiding allocation of all descriptors in the
ring in one attempt. At least one descriptor must remain unused in the
HW ring.

Fixes: 1173fca25a ("ena: add polling-mode driver")
Cc: stable@dpdk.org

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
9ff8fe95dc net/ark: report hardware status on init
Expose additional fpga status registers.
Report hardware status during PMD init.

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
2017-04-19 15:37:37 +02:00
Ed Czeck
3574222fc4 net/ark: set mbuf time stamp field on Rx
Time stamp was carried in the packet meta data, but not
place in the mbuf. The new time stamp field is the proper
destination.

Remove the setting of data offset since this is done by
rte_pktmbuf_free()

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
Acked-by: John Miller <john.miller@atomicrules.com>
2017-04-19 15:37:37 +02:00
Nélio Laranjeiro
6703d83634 net/mlx5: remove extra check on Rx
Removing this check improves performance as VLAN and CRC stripping are
enabled most of the time.

Convert MLX5_CQE_VLAN_STRIPPED to network order to speed up the check
instead of doing it on the completion queue entry field.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-19 15:37:37 +02:00
Marcin Wilk
695cd416ce net/thunderx: fix stats access out of bounds
Trying to assign more queues to stats struct break only from one loop
when the maximum size is reached. Outside loop iteration is continued.
This leads to access an array out of bounds.

Fixes: 21e3fb0050 ("net/thunderx: add final bits for secondary queue support")
Cc: stable@dpdk.org

Signed-off-by: Marcin Wilk <marcin.wilk@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
a3bc447b40 net/ixgbe: move private APIs to a specific file
Create a new file rte_pmd_ixgbe.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Wenzhuo Lu
96974a6600 net/i40e: move private APIs to a specific file
Create a new file rte_pmd_i40e.c for all the private
APIs. Move all the related code to the new file.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-19 15:37:37 +02:00
Jingjing Wu
1d43099033 net/i40e: fix default PFC setting
To keep consistent with previous release, Priority Flow Control (PFC)
need to be disabled by default. This patch fixes it.

This also fixes an issue where traffic was not forwarded by testpmd
occasionally. In those cases ~4770 pps seen on one of the ports rather
than the full rate (>20mpps).

Fixes: 6f0a707e5b ("net/i40e: enable DCB on SRIOV VFs")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Tested-by: David Hunt <david.hunt@intel.com>
2017-04-19 15:37:37 +02:00
Jeff Guo
e711f8a8cd net/i40e: fix hash input set on X722
There are some new PCTYPEs on X722, but they have not been announced
on the RTE lib, so if it can not set corresponding hash input set for
these packet type, the hash function won’t work.

So we need to handle them base on the translation of the new
PCTYPE and the original PCTYPE.

Fixes: b6a0ec4182 ("i40e: use AQ for Rx control register read/write")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-19 15:37:37 +02:00
John Daley
fb83a23eeb net/enic: remove initialization of some mbuf fields
Remove initialization of next and nb_segs mbuf fields in the Rx path
since they are now initialized in the mbuf pool.

See commit 8f094a9ac5 ("mbuf: set mbuf fields while in pool").

Signed-off-by: John Daley <johndale@cisco.com>
2017-04-19 15:37:37 +02:00
Jerin Jacob
5ba411079f net/thunderx: use internal byte ordering macros
The base code was using native GCC macros
for endian detection. Change to portable
rte_byteorder.h based endian detection.

Fixes: 262d43fe20 ("net/thunderx/base: add HW register definitions")

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-19 15:37:37 +02:00
Pascal Mazon
69ebb8ae17 net/tap: update driver param string
Fixes: 2bc06869cd ("net/tap: add remote netdevice traffic capture")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
b81f5fa27f net/ixgbe: remove option to disable offload flags
Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Konstantin Ananyev
f160666a10 net/ixgbe: eliminate mbuf write on rearm
With the mbuf rework, we now have 8 contiguous bytes to be rearmed in the
mbuf just before the 8-bytes of olflags. If we don't do the rearm write
inside the descriptor ring replenishment function, and delay it to
receiving the packet, we can do a single 16B write inside the RX function
to set both the rearm data, and the flags together.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-19 15:37:37 +02:00
Jianbo Liu
309f95f2b6 net/i40e: sync between x86 and arm64 vector PMD
Porting two changes from x86 SSE implematation.
    net/i40e: fix checksum flag in x86 vector Rx
    net/i40e: eliminate mbuf write on rearm

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-19 15:37:37 +02:00
Bruce Richardson
c3f7edcd8c net/i40e: remove option to disable offload flags
Having packets received without any offload flags given in the mbuf is not
very useful, and performance tests with testpmd indicates little to no
benefit is got with the current code by turning off the flags. This makes
the build-time option pointless, so we can remove it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-19 15:37:37 +02:00