Xiao Wang [Tue, 24 Oct 2017 13:45:50 +0000 (06:45 -0700)]
net/fm10k: support switch restart on PF
For PF events indicating a change in the state of the switch manager,
the driver will restore the basic port configurations and then pass this
event to application so that the application can restore any additional
configurations if required.
In this way, once the switch manager restarts, the DPDK application can
resume its network.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Xiao Wang [Tue, 24 Oct 2017 13:45:49 +0000 (06:45 -0700)]
net/fm10k: redefine link status semantics
As fm10k host interface is not directly connected to PHY, marking the
link status as UP doesn't mean a lot to the application.
So, this patch basically redefines the link status as the state of
switch manager: when switch manager is running, it's LINK_UP;
when switch manager goes down by calling the fmTerminate function,
status turns to LINK_DOWN.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:17 +0000 (17:18 +0200)]
net/mlx5: fix reception when VLAN is added
When VLAN is enabled in the Rx side, only packets matching this VLAN are
expected, this also includes the broadcast and all multicast packets.
Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic") Fixes: 6a6b6828fe6a ("net/mlx5: use flow to enable all multi mode") Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:16 +0000 (17:18 +0200)]
net/mlx5: fix mark action with drop action
Marking a packet which will not be received by the NIC is useless, even
if this action remains possible, it blocks the creation of the flow
counter which embed a mark action to a drop queue to be created.
Fixes: 31ba9997f11a ("net/mlx5: fully convert a flow to verbs in validate") Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Tue, 24 Oct 2017 15:18:13 +0000 (17:18 +0200)]
net/mlx5: fix work queue array size
Indirection table size must be in log to communicate with verbs when the
number of queue is not a power of two, the maximum indirection table
size is use, but not converted to log2. This makes a memory corruption.
Aviad Yehezkel [Tue, 24 Oct 2017 14:48:16 +0000 (17:48 +0300)]
app/testpmd: fix build without ixgbe and bnxt PMDs
Fixes: 4cfe399f6550 ("net/bnxt: support to set VF rxmode") Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof") Cc: stable@dpdk.org Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Shahaf Shuler [Tue, 24 Oct 2017 06:16:09 +0000 (09:16 +0300)]
net/mlx5: fix packet type flags for Ethernet only frame
Considering the PMD supports only Ethernet transport, packet which
arrives without any packet type flags in the completion should be
marked with L2_ETHER flag.
Wei Dai [Mon, 23 Oct 2017 06:43:57 +0000 (14:43 +0800)]
net/ixgbe: fix PF DCB info
When SRIOV is active, the function ixgbe_dev_get_dcb_info( )
should return the DCB traffic class info of its own queues,
not including any DCB info of the queues of any its VF.
When VMDQ is active, all queues are belonged to the PF,
the function ixgbe_dev_get_dcb_info can return DCB info
of all queues.
Fixes: 89d6728c7837 ("ethdev: get DCB information") Cc: stable@dpdk.org Signed-off-by: Wei Dai <wei.dai@intel.com> Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
Xueming Li [Tue, 17 Oct 2017 02:46:43 +0000 (10:46 +0800)]
net/mlx5: fix icc compiler warning
Initialize variable to avoid ICC compiler warning:
http://www.dpdk.org/ml/archives/dev/2017-October/077971.html
Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor") Signed-off-by: Xueming Li <xuemingl@mellanox.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
John Daley [Mon, 23 Oct 2017 20:23:00 +0000 (13:23 -0700)]
net/enic: fix packet loss after MTU change
If multiple Rx queues and Rx Scatter are used and the MTU is
modified so that the number of mbufs per packet changes, packet
loss is possible.
The enic completion queue index was miscalculated leaving the
upper half of the queues uninitialized after an MTU change, possibly
leading to completions on those queues not getting processed.
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update") Cc: stable@dpdk.org Signed-off-by: John Daley <johndale@cisco.com>
Nélio Laranjeiro [Mon, 23 Oct 2017 11:17:57 +0000 (13:17 +0200)]
net/mlx5: fix RSS hash update
Few bugs fixes in both configuration get and hash update where inputs
are not handled as expected by the ethdev layer.
RSS structure may not be totally usable, the PMD should try to take as
most information from it has it can when it is an hash update or it
should try to fill as most as possible in the configuration get.
This means that in the RSS configuration structure, the memory space for
the RSS hash key may not be present, but the PMD should consider the
hash field valid and process/set it.
Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols") Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
Nélio Laranjeiro [Mon, 23 Oct 2017 11:17:56 +0000 (13:17 +0200)]
app/testpmd: fix RSS structure initialisation
Struct rss_conf.rss_key_len is not initialised forcing the user to
verify the rss_conf.rss_key pointer to know if the key is present
or not. rss_conf.rss_key_len should have a valid length according
to the size of the rss_key pointed.
Matan Azrad [Sat, 21 Oct 2017 20:54:45 +0000 (20:54 +0000)]
net/failsafe: improve stats accuracy
The stats_get API was changed to signal a potential failure to read
stats. Furthermore, some PMDs are able to provide statistics even
after a removal event occurred.
Considering this, the fail-safe can try to access the latest
statistics of a PMD to improve statistics accuracy.
Attempt an ultimate statistics read on removal time; if that
fails, use the latest recorded snapshot.
Raslan Darawsheh [Thu, 19 Oct 2017 21:15:00 +0000 (00:15 +0300)]
net/failsafe: fix PCI devices init
When trying to attach a port as a sub-device, the ethdev port
was compared with devargs.
In the case of a PCI device, the name in devargs is the PCI address.
And since DPDK 17.08, the devargs name of the underlying device was
used to match an ethdev port: a1e7c17555e8 ("ethdev: use device name from device structure")
But the recent commit 72e3efb149cc has reverted this wrong matching
to use the ethdev port name as identifier of the port.
It impacts functions like rte_eth_dev_allocated() used in failsafe
for matching ports with given devargs.
The fix is to search for matching devargs in underlying device of
all ethdev ports.
If many ports match the same PCI device, only the first one is matched.
This limitation was already present in previous implementation of
rte_eth_dev_allocated(), and must be adressed later with a better
devargs syntax.
Fixes: 72e3efb149cc ("ethdev: revert use port name from device structure") Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh <rasland@mellanox.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Adrien Mazarguil [Thu, 19 Oct 2017 16:11:09 +0000 (18:11 +0200)]
net/mlx4: relax Rx queue configuration order
Various hardware limitations apply to RSS indirection tables, one of
them being they must be an exact 1:1 mapping of the configured Rx queue
indices.
While this restriction is enforced when creating RSS flow rules, it is
not the case when Rx queues themselves are created; underlying WQ
numbers are assigned in turn, not according to queue index.
Applications such as l3fwd-power that create Rx queues from highest to
lowest index (or any other non-sequential order) thus fail to get a
working RSS context.
This commit postpones WQ initialization to dev_start(), once all Rx
queues are configured in order to address this issue.
Adrien Mazarguil [Thu, 19 Oct 2017 16:11:05 +0000 (18:11 +0200)]
net/mlx4: fix useless flow rules synchronization
According to the original commit, Rx queues cannot be created nor
destroyed while the device is started. Synchronizing flow rules during
such events is unnecessary as it occurs later when starting the device.
Fixes: 79770826499b ("net/mlx4: drop live queue reconfiguration support") Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Harish Patil [Thu, 19 Oct 2017 01:13:30 +0000 (18:13 -0700)]
net/qede: add support for VXLAN UDP port config over VF
- Allow VXLAN enable/disable over VF using udp_tunnel_port_add/del APIs.
Only default MAC/VLAN classification is supported.
- Enable VxLAN before UDP port configuration.
- Change VxLAN default UDP port to 4789 instead of 8472.
Ivan Malov [Wed, 18 Oct 2017 09:39:57 +0000 (10:39 +0100)]
net/sfc: fix Tx reap behaviour on port stop on EF10 datapath
Tx reap mechanism on EF10 native datapath was altered by one
of the recent patches to introduce performance optimisations
using the common technique of freeing mbuf segments in bulks.
From this perspective, the way of associating SW descriptors
with individual mbuf segments rather than with whole packets
was adopted as a key requirement for the entire optimisation.
However, only the fast path reap function was amended to fit
the new scheme whilst the corresponding function on the port
stop path was left intact by mistake. This implies incorrect
usage of rte_pktmbuf_free() with regard to separate segments
rather than calling rte_pktmbuf_free_seg() and must be fixed.
Fixes: d321954343c8 ("net/sfc: free mbufs in bulks on EF10 native Tx reap") Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Akhil Goyal [Wed, 25 Oct 2017 15:07:27 +0000 (20:37 +0530)]
examples/ipsec-secgw: support security offload
Ipsec-secgw application is modified so that it can support
following type of actions for crypto operations
1. full protocol offload using crypto devices.
2. inline ipsec using ethernet devices to perform crypto operations
3. full protocol offload using ethernet devices.
4. non protocol offload
Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Declan Doherty <declan.doherty@intel.com> Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Boris Pismenny [Wed, 25 Oct 2017 15:07:20 +0000 (20:37 +0530)]
mbuf: add security crypto flags and fields
Add security crypto flags and update mbuf fields to support
IPsec crypto offload for transmitted packets, and to indicate
crypto result for received packets.
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
Declan Doherty [Wed, 25 Oct 2017 12:00:35 +0000 (13:00 +0100)]
cryptodev: break dependency on virtual device bus
Removes any dependency of librte_cryptodev on the virtual device
infrastructure code and removes the functions which were virtual
device specific.
Updates all virtual PMDs to remove dependencies on rte_cryptodev_vdev.h
and replaces those calls with the new bus independent functions.
Due to these changes, the cryptodev ABI version gets bumped.
Signed-off-by: Declan Doherty <declan.doherty@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Tested-by: Tomasz Duszynski <tdu@semihalf.com>
Pablo de Lara [Mon, 23 Oct 2017 10:37:09 +0000 (11:37 +0100)]
crypto/qat: fix HMAC supported digest sizes
For HMAC algorithms (MD5-HMAC, SHAx-HMAC), the supported
digest sizes are not a fixed value, but a range between
1 and the maximum digest size for those algorithms.
Fixes: 26c2e4ad5ad4 ("cryptodev: add capabilities discovery") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
Aviad Yehezkel [Tue, 24 Oct 2017 12:49:00 +0000 (15:49 +0300)]
examples/ipsec-secgw: convert IV to big endian
According to rfc4106 the IV should be unique and can be implemented
as counter.
The changed was created because putting an analyzer on wire and
comparing packets generated by this application and Linux kernel.
Linux kernel sets IV as BE, so it is worth to do the same for
future debug / comparison.
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Ian Stokes [Tue, 17 Oct 2017 14:15:06 +0000 (15:15 +0100)]
cryptodev: fix build with -Ofast
When compiling with an application that includes rte_cryptodev.h with
Ofast, an error is reported regarding enumeration
RTE_CRYPTO_OP_TYPE_UNDEFINED not handled in switch case in function
__rte_crypto_op_reset().
Fix this by adding a case for RTE_CRYPTO_OP_TYPE_UNDEFINED.
Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented") Cc: stable@dpdk.org Signed-off-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Zhiyong Yang [Thu, 19 Oct 2017 02:56:57 +0000 (10:56 +0800)]
examples/l2fwd-crypto: fix port id type
Fix port id issues and keep variables related to port ids in
consistent data type definition "uint16_t".
Remove unnecessary cast in the meanwhile.
Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tomasz Duszynski [Tue, 17 Oct 2017 07:17:48 +0000 (09:17 +0200)]
crypto/mrvl: print message if DMA mem is initialized
In case MUSDK dma memory has been already initialized by a different
driver (and perhaps do the different size) mv_sys_dma_mem_init()
will return -EEXIST error code.
Printing extra message makes it clear.
Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Tomasz Duszynski [Fri, 13 Oct 2017 12:50:09 +0000 (14:50 +0200)]
examples/ipsec-secgw: fix IP version check
Since new_ip and ip4 are overlapping buffers copying ip4 over new_ip
using memmove() might overwrite memory at ip4. This could happen if
following condition holds:
ip_hdr_len > sizeof(struct esp_hdr) + sa->iv_len
Thus using ip4 to check ip version is wrong as it might not contain
proper value.
Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode") Cc: stable@dpdk.org Signed-off-by: Tomasz Duszynski <tdu@semihalf.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Reviewed-by: Aviad Yehezkel <aviadye@mellanox.com>
Thomas Monjalon [Wed, 25 Oct 2017 15:18:52 +0000 (17:18 +0200)]
doc: remove trailing commas in API index
Fixes: c711ccb30987 ("ivshmem: remove library and its EAL integration") Fixes: e8009a077d17 ("doc: group classification libraries in doxygen index") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: John McNamara <john.mcnamara@intel.com>
Harry van Haaren [Wed, 25 Oct 2017 13:25:29 +0000 (14:25 +0100)]
service: allow to disable core check
This commit adds a new function to disable the runtime mapped
service-cores check. This allows an application to take responsibility
of running unmapped services.
This feature is useful in cases like unit tests, where the application
code (or unit test in this case) requires accurate control over when
the service function is called to ensure correct behaviour, and when
an application has an advanced use-case and wishes to manage services
manually.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>