Commit Graph

15823 Commits

Author SHA1 Message Date
Fan Zhang
1c25cf4a1c pipeline: fix logically dead code
This patches fixes the coverity issue of logically dead code.

Coverity issue: 323523
Fixes: 96303217a6 ("pipeline: add symmetric crypto table action")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
2018-11-12 17:45:23 +01:00
Wei Zhao
264b23e3d2 net/i40e: add parameter check for RSS flow init
There need an parameter check for RSS flow init, or it may cause
core dump if pointer is NULL in memory copy.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-11-14 00:35:53 +01:00
Yanglong Wu
91546fb62e net/ixgbevf: fix link state
For ixgbevf kernel driver, link status changes from down to up
will trigger vf kernel driver send IXGBE_VF_RESET message to pf
kernel driver, after this, vf kernel driver will disable and enable
it self. By these series operations, the vf kernel driver report
link up. Besides, all these operations handles in kernel thread.
For DPDK user space driver, it only gets link status changes from
down to up, but miss IXGBE_VF_RESET message sending and reset itself.
If we will add fully implementation of link status change for DPDK
user space driver, we need take much more modification. We have
aligned that for link status changes from down to up we only notify
link is up, users need to reset vf port.

Fixes: dc66e5fd01 ("net/ixgbe: improve link state check on VF")
Cc: stable@dpdk.org

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-11-14 00:35:53 +01:00
Yongseok Koh
e31b6a4151 net/mlx5: fix Direct Verbs RSS hash field
As mlx5_flow_hashfields_adjust() refers to flow->rss, actions must be
translated prior to items like in Verbs. Otherwise, hash fields are not
correctly set.

Fixes: d02cb06912 ("net/mlx5: add Direct Verbs translate actions")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:53 +01:00
Dekel Peled
12284221d4 doc: add mlx5 IPv6 multicast limitation in VM
This patch adds limitation notice for MLX5 PMD.
IPv6 multicast messages are not received on VM when promiscuous
and allmulticast modes are off, due to netlink restriction.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:53 +01:00
Hyong Youb Kim
7ac790d63b net/enic: fix size check in Tx prepare handler
The current code wrongly assumes that packets are non-TSO and ends up
rejecting large TSO packets. Check non-TSO and TSO max packet sizes
separately.

Fixes: 5a12c38740 ("net/enic: check maximum packet size in Tx prepare handler")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-11-14 00:35:53 +01:00
Igor Romanov
f7c8539801 net/sfc/base: fix field order in filter spec struct
Fields in the struct efx_filter_spec_t starting from efs_outer_vid
are hashed for software filter lookup. efs_mark is not a matching
criteria. Exclude efs_mark from hash.

Fixes: 5f78af5239 ("net/sfc: support MARK and FLAG actions in flow API")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-11-14 00:35:53 +01:00
Ferruh Yigit
68b931bff2 ethdev: eliminate interim variable
`local_conf` variable was needed for offload conversions but no more
required. No functional difference, only interim variable eliminated.

Fixes: ab3ce1e0c1 ("ethdev: remove old offload API")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-11-14 00:35:53 +01:00
Wenzhuo Lu
1a411a6fdb ethdev: fix device info getting
The device information cannot be gotten correctly before
the configuration is set. Because on some NICs the
information has dependence on the configuration.

Fixes: 3be82f5cc5 ("ethdev: support PMD-tuned Tx/Rx parameters")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-11-14 00:35:53 +01:00
Wenzhuo Lu
aa28ec5d27 ethdev: fix invalid configuration after failure
The new configuration is stored during the rte_eth_dev_configure() API
but the API may fail. After failure stored configuration will be
invalid since it is not fully applied to the device.

We better roll the configuration back after failure.

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-11-14 00:35:53 +01:00
Shahed Shaikh
49d3978d57 net/qede: fix Tx tunnel offload support mask
Tunneling offloads are represented by multi-bit values. So, feature
wise tunneling offload can only be entirely supported/unsupported
using PKT_TX_TUNNEL_MASK. Its upon PMDs to further isolate which of
the tunneling offload types are supported by respective PMD.
Using subset of bits from PKT_TX_TUNNEL_MASK to indicate supported vs
unsupported offloads can lead to undesired result.

Use PKT_TX_TUNNEL_MASK in QEDE_TX_OFFLOAD_MASK and use independent
value of supported PKT_TX_TUNNEL_* in .tx_pkt_prepare() to mark
supported tunnel offloads.

Fixes: 44346c24b7 ("net/qede: fix VXLAN tunnel Tx offload flag setting")
Cc: stable@dpdk.org

Suggested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Reviewed-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-14 00:35:53 +01:00
Nitin Saxena
679dfdc96e net/octeontx: fix mbuf corruption with large private sizes
When the priv_size of the mbuf is > 128 bytes, the mbuf would not be
properly constructed. This would lead to a corrupt mbuf.

This patch fixes the issue by accounting for
rte_pktmbuf_priv_size(pool) and RTE_PKTMBUF_HEADROOM
while configuring first skip register calculation.

Fixes: 197438ee9f ("net/octeontx: add Rx queue setup and release ops")
Cc: stable@dpdk.org

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Nitin Saxena <nitin.saxena@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-11-14 00:35:53 +01:00
Thomas Monjalon
15febafdd4 drivers/net: set close behaviour flag at probing
The ethdev flag RTE_ETH_DEV_CLOSE_REMOVE is set for drivers
having migrated to the new behaviour of rte_eth_dev_close().

As any other flag, it can be useful to know about its value
as soon as the port is probed.
Unfortunately, it was set inside the close operation,
just before being erased by memset() in rte_eth_dev_release_port().
The flag assignment is moved to the probing stage, so it can
be checked by the application in order to anticipate the behaviour.

Fixes: 42603bbdb5 ("net/mlx5: release port on close")
Fixes: 6c99085d97 ("net/vmxnet3: fix hot-unplug")
Fixes: 4d7877fde2 ("net/ena: remove resources when port is being closed")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-11-14 00:35:53 +01:00
Ophir Munk
f3698c3d09 app/testpmd: revert setting default RSS
This reverts the patch that enables default RSS action by setting
key=NULL and key_len=0.
In current testpmd implementation a key pointer must exist if
key_len!=0. For example, the following flow rule will cause a
segmentation fault:
flow create 0 <pattern> actions rss queues 0 1 end key_len 40 / end

Fixes: a4391f8bae ("app/testpmd: set default RSS key as null")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-11-14 00:35:53 +01:00
Raslan Darawsheh
2b5651c026 app/testpmd: fix L4 length for UDP checksum
testpmd only sets the L4 len in case of TCP packets.
some PMD's like tap rely on mbuf meta data to calculate csum

This will set the L4 len for UDP packets same as TCP

Fixes: 160c3dc945 ("app/testpmd: introduce IP parsing functions in csum fwd engine")
CC: stable@dpdk.org

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-11-14 00:35:53 +01:00
Timothy Redaelli
69d3e963e4 net/qede: fix crash when configure fails
Currently, if configuration fails (for example if a 100G card is used
with an odd number of RX/TX queues) QEDE crashes due to a null pointer
dereference.

This commit fixes it by checking that the pointer is not NULL before
using it.

Fixes: 7105b24f4b ("net/qede: fix memory alloc for multiple port reconfig")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-14 00:35:53 +01:00
Shahaf Shuler
7d0bc2b159 doc: add mlx5 Direct Verbs flow engine limitation
Would be good to add also a code which disable the dv_flow_en
the user requested. However such support will need to use new netlink
command to query the switchdev mode from the underlying kernel.

Considering the current 18.11 release is close to RC3, only a
documentation is added.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:53 +01:00
Shahaf Shuler
325384fcd9 net/mlx5: remove GRE inner IPv6 matching limitation
Such limitation seems not to exist on:
 - MLNX_OFED_linux-4.5-0.3.0.0 (Beta)
 - MLNX_OFED_LINUX-4.4-2.0.7.0 (GA)
 - upstream kernel 4.19.0-rc7

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Viacheslav Ovsiienko
817a6c4740 net/mlx5: fix VXLAN device rollback if rule apply fails
If rule contains tunneling action (like VXLAN encapsulation)
the VTEP (Virtual Tunneling EndPoint) device is pre-configured
before applying the rule. If kernel returns an error this
VTEP configuration should be rolled back to the origin state.
The patch adds the missing VTEP configuration restoration.

Fixes: 95a464cecc ("net/mlx5: add E-switch VXLAN tunnel devices management")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Viacheslav Ovsiienko
1f64486170 net/mlx5: fix rule cleanup Netlink command sending
The VXLAN related rule cleanup routine queries and gathers all
existing local IP and neigh rules into buffer list. One buffer
may contain multiple rule deletion commands and is prepared
to send into Netlink as single message. But, if error occurs
for some deletion commands in the buffer, the multiple ACK
message with errors can be send back by the kernel. It breaks
the Netlink communication sequence numbers, because we expect
only one ACK message and it smashes out futher Netlik
communication.

The workaround of this problem is to send rule deletion commands
from buffer in one-by-one fashion and get ACK message for every
command sent. We do not expect too may rules preexist, so there
should not be critical performance degradation at VXLAN outer
interface initialization.

Fixes: f420f03d67 ("net/mlx5: add E-switch VXLAN rule cleanup routines")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Viacheslav Ovsiienko
b9e5c3ab2e net/mlx5: add Netlink message size check in rule cleanup
This patch is preparation for the following fix, we are going to send
Netlink message from buffer in one-by-one fashion. It is highly
desirable to check multimessage buffer consistency for debug purposes.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Viacheslav Ovsiienko
00ae11c4e8 net/mlx5: fix buffer allocation check in rule cleanup
The Netlink message buffer is allocated and there is the typo,
the other pointer is checked instead of returned one. If no
memory is allocated and NULL is returned by allocation routine
the bug causes segmentation fault. The patch fixes typo,
returned pointer is validated.

Fixes: f420f03d67 ("net/mlx5: add E-switch VXLAN rule cleanup routines")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Luca Boccassi
0c9df53de4 net/mlx5: fallback quietly if pkg-config is unavailable
Don't fail the build if pkg-config can't be found, instead print the
linker flag as it was doing before the change.

Fixes: b6b8793919 ("net/mlx5: use pkg-config to handle SUSE libmnl")
Cc: stable@dpdk.org

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:53 +01:00
Dekel Peled
99813c2a32 net/mlx5: fix flow director add and delete
Fix the flow_fdir_cmp() function, used by flow_fdir_filter_lookup().
This function is used by flow_fdir_filter_add() to check if same rule
exists, and by flow_fdir_filter_delete() to find flow rule to delete.

The function compared actions conf pointers, changed to compare
actions type only.

Fixes: 2720f833d4 ("net/mlx5: add missing flow director delete")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-11-14 00:35:53 +01:00
Radu Nicolau
0911d4ec01 net/bonding: fix crash when stopping mode 4 port
When stopping a bonded port all slaves are deactivated. Attempting
to deactivate a slave that was never activated will result in a segfault
when mode 4 is used.

Fixes: 7486331308 ("net/bonding: stop and deactivate slaves on stop")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
2018-11-14 00:35:53 +01:00
Rasesh Mody
39ae74caa0 net/bnx2x: fix VF link state update
In general the VF driver should not access the chip. For VF link status
update, VF driver should not use HW lock, use bnx2x_link_report_locked()
instead.
Add few prints for releasing previously held HW locks.

Fixes: a9b58b15ed ("net/bnx2x: fix to add PHY lock")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-11-14 00:35:53 +01:00
Rasesh Mody
853c782496 net/bnx2x: fix dynamic logging
Use rte_log() rather than RTE_LOG() for dynamic logging. Rearrange
dynamic log types to the top and configurable log types to bottom.
Remove unused RTE_LIBRTE_BNX2X_DEBUG_TX_FREE

Fixes: ba7eeb035a ("net/bnx2x: fix logging to include device name")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2018-11-14 00:35:53 +01:00
Tiwei Bie
0541588a44 vhost: remove unneeded null pointer check
The caller will guarantee that msg won't be null. Remove
the unneeded null pointer check which caused a Coverity
warning.

Coverity issue: 323484
Fixes: 8f972312b8 ("vhost: support vhost-user")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-14 00:35:53 +01:00
Tiwei Bie
ecfae1510e net/virtio: fix unchecked return value
Coverity issue: 302861
Fixes: 6ba1f63b5a ("virtio: support specification 1.0")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-14 00:35:53 +01:00
Fan Zhang
cd1e8f03ab vhost/crypto: fix packet copy in chaining mode
This patch fixes the incorrect packet content copy in the
chaining mode. Originally the content before cipher offset is
overwritten by all zeros. This patch fixes the problem by
making sure the correct write back source and destination
settings during set up.

Fixes: 3bb595ecd6 ("vhost/crypto: add request handler")
Cc: stable@dpdk.org

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-14 00:35:53 +01:00
Tiwei Bie
2dac0df47c net/virtio-user: fix typo in error message
The param we are checking is VIRTIO_USER_ARG_PATH, instead
of VIRTIO_USER_ARG_QUEUE_SIZE.

Fixes: ce2eabdd43 ("net/virtio-user: add virtual device")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
2018-11-14 00:35:53 +01:00
Tiwei Bie
30affaeebc vhost: fix IOVA access for packed ring
We should apply for RO access when receiving packets from the
VM and apply for RW access when sending packets to the VM.

Fixes: a922401f35 ("vhost: add Rx support for packed ring")
Fixes: ae999ce49d ("vhost: add Tx support for packed ring")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-14 00:35:53 +01:00
Subrahmanyam Nilla
823ebfc219 net/thunderx: fix Tx desc corruption in scatter-gather mode
For performance reasons, word1 of send_hdr_s
sub descriptor was not cleared assuming it is always
having default value of zero since it comes from fixed
offsets of SQ buffer.
This is causing issues in case of SG mode because,
the size of send command might change and hence the word1
of send_hdr_s is not always at fixed offsets of the SQ buffer
and hence not having default value of zero.

This fixes the issue by clearing the word1 in case of SG mode
for every packet.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
Cc: stable@dpdk.org

Signed-off-by: Subrahmanyam Nilla <snilla@caviumnetworks.com>
Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
27e5d9000c net/cxgbevf: fix illegal memory access when freeing MPS TCAM
Individual MPS TCAM entries are not allocated as separate entities.
All entries are allocated once as an array. So, fix bug with attempting
to free illegal memory location.

Also add missing MPS TCAM initialization for CXGBEVF.

Fixes: 6fda3f0ddd ("net/cxgbe: add API to program hardware MPS table")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
34ca5e3eb7 net/cxgbe: fix wrong ingress port value set in filter spec
Set the "value" in the filter spec and not the "mask". Also, remove
duplicate comparison for hardware supported match items already done
earlier.

Fixes: af44a57798 ("net/cxgbe: support to offload flows to HASH region")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
f1e9d2afea net/cxgbe: increase completion wait time for flow operations
Under heavy load, flow related operations can take more time to
complete. Increase max completion wait time to 10 seconds. Also
increase max receive budget to read more replies from firmware
in every cycle.

Fixes: 9eb2c9a480 ("net/cxgbe: implement flow create operation")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
15fb77f62c net/cxgbe: fix check for redefined match items
Fix issue where ethertype is set to 0x800 for IPv4 by ether match
item and IPv4 match item also inherently sets ethertype to 0x800.

Current logic returns error when IPv4 match item is parsed. So, fix
by only bailing if the redefined match items have different values.

Fixes: ee61f5113b ("net/cxgbe: parse and validate flows")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
6507fb6f0a net/cxgbe: check Rx config before doing VLAN strip offload
Fixes: 436125e641 ("net/cxgbe: update to Rx/Tx offload API")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Rahul Lakkireddy
854f4bf07c net/cxgbevf: add PCI uninitialization for VF
Fixes: 2195df6d11 ("net/cxgbe: rework ethdev device allocation")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-11-14 00:35:53 +01:00
Ilya Maximets
916193dda6 net/ixgbe: stop link setup alarm handler before start
We should stop alarm handler before resetting the HW to
avoid concurrent device reconfiguration.

Fixes: 0408f47ba4 ("net/ixgbe: fix busy polling while fiber link update")
CC: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-11-14 00:35:53 +01:00
Thomas Monjalon
725f5dd0bf net/mlx5: fix build on PPC64
The AltiVec header file breaks boolean type:

error: incompatible types when initializing type
'__vector _bool int' {aka '_vector(4) __bool int'} using type 'int'

If __APPLE_ALTIVEC__ is defined, then bool type is redefined
and conflicts with stdbool.h.

There is no good solution to fix it for the whole project without
breaking something else, so a workaround is inserted in mlx5 PMD.
This workaround is not compatible with C++ but there is no C++ in DPDK.

Suggested-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Suggested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Tested-by: David Wilder <dwilder@us.ibm.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2018-11-14 00:35:53 +01:00
Yunjian Wang
ba46f5e60f net/e1000/base: fix uninitialized variable
This patch fixes the variable 'phy_word' may be used uninitialized.

Fixes: 5b6439cf03 ("e1000/base: support different EEARBC for i210")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-11-14 00:35:53 +01:00
Vipin Varghese
126372ce72 net/tap: fix probe for multiq or flowq failure
In scenarios for multiq or flowq setup failure
`rte_eth_dev_probing_finish()` has to be invoked for successful device
registration.

Fixes: fbe90cdd77 ("ethdev: add probing finish function")
Cc: stable@dpdk.org

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2018-11-14 00:35:53 +01:00
Wei Zhao
054075ea90 app/testpmd: fix Rx offload search
There is an error in function search_rx_offload(),
it will break when get unexpected return value from function
rte_eth_dev_rx_offload_name(), but rte_eth_dev_rx_offload_name()
will return some unexpected value indeed.

Fixes: c73a907187 ("app/testpmd: add commands to test new offload API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
2018-11-14 00:35:53 +01:00
Ori Kam
a5e7c52dac examples/flow_filtering: fix capability setting
The tx offloads should be compared to tx capability

Fixes: c82f2f8b4b ("examples/flow_filtering: filter out unsupported offloads")
Cc: stable@dpdk.org

Signed-off-by: Ori Kam <orika@mellanox.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
2018-11-14 00:35:53 +01:00
Yongseok Koh
3193c2494e net/mlx5: fix L4 protocol validation
- Currently, no device supports partial mask for protocol in IP header.
- As there could be multiple IP items, next_protocol variable in flow
  validation has to be reset for inner layer. Otherwise, inner TCP/UDP
  will see protocol number of outer IP header.
- Remove redundant protocol checking for MPLS, which is done in
  mlx5_flow_validate_item_mpls().

Fixes: 3d69434113 ("net/mlx5: add Direct Verbs validation function")
Fixes: 23c1d42c71 ("net/mlx5: split flow validation to dedicated function")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:53 +01:00
Yongseok Koh
636a71dedc net/mlx5: fix device flow reference
dev_flow->verbs is mistakenly used instead of dev_flow->dv. A sanity
check is added for debugging purpose.

Fixes: fc2c498ccb ("net/mlx5: add Direct Verbs translate items")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2018-11-14 00:35:52 +01:00
Stephen Hemminger
e0a10f4691 net/tap: fix file descriptor check
Static analysis tools don't like the fact that fd could be zero
in the error path. This won't happen in real world because
stdin would have to be closed, then other error occurring.

Coverity issue: 14079
Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2018-11-14 02:14:12 +01:00
Stephen Hemminger
cc02c97718 net/tap: fix file descriptor leak on error
If netlink socket setup fails the file descriptor was leaked.

Coverity issue: 257040
Fixes: 7c25284e30 ("net/tap: add netlink back-end for flow API")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2018-11-14 02:14:09 +01:00
Stephen Hemminger
6521c9a2f7 bus/vmbus: fix directory handle leak on error
If sysfs directory was incorrectly formatted then the vmbus
setup code would leak a directory handle in the error path.

Coverity issue: 302848
Fixes: 831dba47bd ("bus/vmbus: add Hyper-V virtual bus support")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-11-14 02:13:56 +01:00