Commit Graph

5635 Commits

Author SHA1 Message Date
Xiaoyun Li
5ce4c2be1a net/avf: fix offload capabilities
There are several tx/rx offload capabilities missing in AVF.
Add them in this patch since AVF supports them.

Fixes: 69dd4c3d08 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2018-08-02 04:19:50 +02:00
Wei Zhao
21ecd2d7ab net/i40e: revert fix of flow director check
This reverts commit 7546dc4a13.

In i40e FDIR PMD code for checking programming status,
when the action of add FDIR filter is ok, i40e NIC will
not write back to programming status descriptor, so if
PMD code check DD is not done after period of time dealy,
it means the add or remove filter action is ok. It only write
back descriptor when fail. So, there is no issue for the original
code.

Fixes: 7546dc4a13 ("net/i40e: fix check of flow director programming status")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-08-01 15:36:32 +02:00
Harry van Haaren
f5dd9a88de net/i40e: fix rearm check in AVX2 Rx
This commit fixes an infinite loop bug that could occur
if the i40e AVX2 driver is used, and high traffic rates
cause the mempool from which the rxq pulls mbufs to become
empty.

The result would be an infinite loop of checking if we
should perform an rx rearm, calling the function and an
error return due the the mempool being emtpy.

The fix is to align the code in the AVX2 driver with the
SSE driver, where an if() is used instead of a while(),
allowing the thread to return from i40e rx function even
if the mempool is empty.

Fixes: dafadd7376 ("net/i40e: add AVX2 Rx function")
Cc: stable@dpdk.org

Reported-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Brendan Ryan <brendan.ryan@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
2018-08-01 02:41:29 +02:00
Yanglong Wu
014a48de60 net/i40e: fix maximum frame size check
Check packet size according to TSO or no-TSO.

Fixes: bfeed0262b ("net/i40e: check illegal packets")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-07-30 03:01:30 +02:00
Beilei Xing
33310b592f net/i40e: fix device parameter parsing
There's parsing error when using device argument
support-multi-driver or queue-num-per-vf or both.
Error log is "PMD: Error parsing device, invalid
key <support-multi-driver>" and "PMD: Error parsing
device, invalid key <queue-num-per-vf>". The root
cause is that device argument will be parsed in
different parsing functions with local valid key .
This patch fixes the issue by combine all supported
arguments's valid keys.

Fixes: cfdfca493c ("net/i40e: fix multiple driver support")
Fixes: ee653bd800 ("net/i40e: determine number of queues per VF at run time")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-26 08:01:47 +02:00
Adrien Mazarguil
16ed22ba14 net/mlx5: fix VLAN pop action on switch flow rules
TC message for VLAN POP is broken due to an unfinished nested attribute.

Fixes: 7ac6778d50 ("net/mlx5: add VLAN item and actions to switch flow rules")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-02 13:47:57 +02:00
Adrien Mazarguil
eb19f1f6c8 net/mlx5: fix VLAN matching on switch flow rules
VLAN ID is not properly translated to TC due to swapped byte order.

Fixes: 7ac6778d50 ("net/mlx5: add VLAN item and actions to switch flow rules")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-08-02 13:46:39 +02:00
Moti Haimovsky
dd6eaddff7 net/mlx5: fix RSS flow configuration crash
This commit fixes a segmentation fault observed when configuring
mlx5 with RSS flow rule containing invalid queues indices such as
negative numbers, queue numbers bigger than the number Rx queues the
PMD or has no queues at all.

Fixes: 592f05b29a ("net/mlx5: add RSS flow action")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
2018-08-02 13:22:35 +02:00
Ophir Munk
09e0fd260e net/mlx5: fix secondary process resource leakage
When running testpmd with an mlx5 device and then executing at testpmd
prompt in a raw: "port start all" followed by "port stop all"
a new file named /var/tmp/net_mlx5_<socket num> is created as a result
of creating a new unix domain socket (used for communication between
the primary and secondary processes).
When the new unix socket file is created the old unix socket file should
have been removed. This commit fixes it by closing the old unix socket
just before creating the new one in function mlx5_socket_init()

Fixes: f8b9a3bad4 ("net/mlx5: install a socket to exchange a file descriptor")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
2018-08-02 13:15:27 +02:00
Shahaf Shuler
9da1db6bbf net/mlx5: fix VLAN filtering
The below commit has added a graph based expansion logic for RSS rule to
satisfy Verbs requirements. With this logic, for example, the rule:

flow create 0 ingress pattern eth / end actions rss queues 0 1 end types
ipv4-tcp ipv6-tcp end / end

will be expanded into the rules:

flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss queues 0 1
end types ipv4-tcp ipv6-tcp end / end

flow create 0 ingress pattern eth / ipv6 / tcp / end actions rss queues 0 1
end types ipv4-tcp ipv6-tcp end / end

flow create 0 ingress pattern eth / end actions queue index 0 / end

The below commit defined two graphs:
1. graph for the tunnel case which starts from the ETH item
2. graph for the non-tunnel case which starts from the ETH item

The graphs are ignoring the VLAN case. Hence rules with VLAN item will
fail to traverse the graph and it will result in flow rule creation error.

Adding the VLAN item to the existing graphs will not work as the flow
engine will reject any VLAN item without a specific vid.

To solve this case two new graphs were added (for the tunnel and
non-tunnel case) which contain the VLAN item and are being used only
when the VLAN item exists in the flow pattern.

Two cases left un-covered for the inner RSS:
1. The case were VLAN exists in the pattern as part of the inner headers
2. The case were VLAN exists in the pattern both in the outer and the
inner headers

Solving those cases will require to add two more graphs.
Holding a VLAN for the overlay network is not common, the subnets are
usually defined by the tunnel protocol, for example the VXLAN vni.
Hence adding those two graphs seems like an overkill at this point.
Based on needs one can add those to provide the full support.

Fixes: 592f05b29a ("net/mlx5: add RSS flow action")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-08-02 13:15:18 +02:00
Moti Haimovsky
ff9fe66c97 net/mlx4: advertise Rx jumbo frame support
This commit adds the missing Rx jumbo frame support advertisement
in Rx offload capabilities.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:18 +02:00
Matan Azrad
2d3b832052 net/mlx5: fix packet type offload for tunnels
There are dedicated QP attributes, tunnel offload flag and mask, which
must be configured in order to allow part of the HW tunnel offloads.

So, if a QP is pointed by a tunnel flow, the above QP attributes
should be configured.

The mask configuration is wrongly only performed if an internal RSS was
configured by the user, while there is no reason to condition the
tunnel offloads in RSS configurations.

Consequently, some of the tunnel offloads was not performed by the HW
when a tunnel flow was configured, for example, the packet tunnel
types was not reported to the user.

Replace the internal RSS condition with the tunnel flow condition.

Fixes: df6afd377a ("net/mlx5: remove useless arguments in hrxq API")

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:18 +02:00
Timothy Redaelli
c7684b6be4 net/mlx5: avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 59b91bec12 ("net/mlx5: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-08-02 12:34:17 +02:00
Timothy Redaelli
d7a4e99d84 net/mlx4: avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes
impossible to generate (split) debug symbols and this can lead to a more
difficult debugging.

Fixes: 27cea11686 ("net/mlx4: spawn rdma-core dependency plug-in")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2018-08-02 12:34:17 +02:00
Shahaf Shuler
ed4c7fd92a net/mlx5: fix flow count action for shared counter
According to commit fb8fd96d42 ("ethdev: add shared counter to flow
API") the counter id should be taken into account only when the shared
flag is set.

Fixes: 60bd8c9747 ("net/mlx5: add count flow action")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
2018-08-02 12:34:17 +02:00
Moti Haimovsky
2b4e423fd4 net/mlx4: check RSS queues number limitation
This patch verifies that the number of Rx queues configured for RSS
is supported by the device hardware.
RSS support in mlx4 requires contiguous chunk of QPs to be reserved,
there is a hardware limitation on the amount of contiguous QPs which
is reported by the hardware. Ignoring this value will cause Rx queues
creation to fail.

Cc: stable@dpdk.org

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-08-02 12:34:16 +02:00
Gavin Hu
e94be227b7 net/dpaa2: remove loop for unused pool entries
Currently only one buffer pool is configured and in use,
looping for up to maxmum 8 times is unnecessary and might
be buggy as assigned uninititalized values.

The fix is to loop for the configured times with initialize
with valid values.

Fixes: 16bbc98a3e ("bus/fslmc: update MC to 10.3.x")
Cc: stable@dpdk.org

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
2018-08-03 17:09:44 +02:00
Rasesh Mody
688654bf32 net/bnx2x: move SPDX tags to source files
We were using LICENSE.bnx2x_pmd to reference inclusion of SPDX licensing
tag from all the source file. Remove the LICENSE.bnx2x_pmd file and
directly include SPDX tags in source files.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-08-03 17:08:39 +02:00
Rasesh Mody
9eb5dc09c3 net/bnx2x: fix copyright
Originally the PMD had "QLogic Corporation" copyright. When we submitted
commit e3de5dad2a ("net/bnx2x: change copyright info to Cavium"),
the "Qlogic Corporation" copyright was accidentally replaced
with "Cavium Inc". So now we see multiple Cavium copyright messages.
We're changing it to "Broadcom Corporation" copyright.

Fixes: e3de5dad2a ("net/bnx2x: change copyright info to Cavium")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 17:08:34 +02:00
Rasesh Mody
d5ae91cbe7 net/bnx2x: bump version to 1.0.6.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 15:44:06 +02:00
Rasesh Mody
6041aa619f net/bnx2x: fix poll link status
The PMD has been modified to invoke the polling function in the link
management code which detects the peer speed/mode, configure the link
and update the status accordingly. This patch is the fix for the link
down issue seen when we do dev_stop() and dev_start() from an
application.

Fixes: 540a211084 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-03 15:43:12 +02:00
Rasesh Mody
4a4607bb9c net/bnx2x: fix FW command timeout during stop
This patch fixes firmware command timeout error seen during device stop
while stopping queues. It patially reverts an earlier preventive change
commit 91b7e432bc ("net/bnx2x: disable fast path interrupts") to now
enable fast path interrupts.

The original issue of performance degradation is not observed anymore,
with or without the fix.

Fixes: 91b7e432bc ("net/bnx2x: disable fast path interrupts")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 22:06:34 +02:00
Shahed Shaikh
7e3060a370 net/qede: fix MAC address removal failure message
Don't treat MAC address removal failure as a fatal error
and print in logs.

Fixes: 77fac1b54f ("net/qede: fix filtering code")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-02 21:48:19 +02:00
Rasesh Mody
538bcb378a net/qede/base: fix GRC attention callback
Treat any attention which is not for timeout event as invalid
and return status accordingly. The HW error handler logs and clears
the HW attention. Without this fix we can see flood of GRC attentions.

Fixes: e6051bd6b0 ("qede: add interrupt handling support")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 21:47:57 +02:00
Rasesh Mody
c8dbf68143 net/qede/base: fix to clear HW indication
VDMs may cause the was_error indication to be set after the driver
clears it. Clear the indication after the internal FID_enable for
the PF is set.

Fixes: 60c78a5e25 ("net/qede/base: fix recovery from previous ungraceful exit")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2018-08-02 21:41:45 +02:00
Shahed Shaikh
4eee1bbf25 net/qede: fix interrupt handler unregister
Commit 023d7a0449f11 ("net/qede: fix legacy interrupt mode")
added a handler for legacy interrupt mode but forgot to
unregister same handler in rte_intr_callback_unregister()

Fixes: 245aec2893 ("net/qede: fix legacy interrupt mode")
Cc: stable@dpdk.org

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
2018-08-02 12:42:11 +02:00
Ajit Khaparde
7f675c27d9 net/bnxt: fix RETA size
The reta_size being indicated in the bnxt_dev_info_get_op was incorrect.
Set it to the value supported by the hardware.

Fixes: 0a6d2a7200 ("net/bnxt: get device infos")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Tested-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
6dc875ab5f net/bnxt: check access denied for HWRM commands
Firmware can restrict access to certain resources in the hardware
depending on various factors. In such cases when the PMD tries to
configure these resources the firmware will return
HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED error. Parse this and return
the standard EACCES error to the applications.

Fixes: 804e746c7b ("net/bnxt: add hardware resource manager init code")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
4623c0d4b5 net/bnxt: fix lock release on NVM write failure
In bnxt_hwrm_flash_nvram, before attempting to allocate a buffer
we are grabbing the rte_spinlock. And if the allocation fails we
are returning before releasing the spinlock. We avoid the situation
by calling HWRM_PREP which grabs the lock after the buffer is
allocated successfully.

Fixes: 19e6af01bb ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:12:47 +02:00
Ajit Khaparde
6621ae1461 net/bnxt: fix memory leaks in NVM commands
In some cases we may not be freeing up memory allocated for certain
NVM commands because the code might have bailed out before reaching
rte_free(). This patch moves some code around to ensure the allocated
memory is freed before exiting the function.

Fixes: 19e6af01bb ("net/bnxt: support get/set EEPROM")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Michael Wildt <michael.wildt@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-08-02 12:05:25 +02:00
Somnath Kotur
eae0a36249 net/bnxt: fix filter freeing
bnxt_clear_hwrm_vnic_filters() was removing the created filter from HW,
but not clearing the internal data structures by removing it from the
struct bnxt_vnic_info->filter list.

Fixes: 5ef3b79fdf ("net/bnxt: support flow filter ops")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-08-02 12:00:48 +02:00
Shagun Agrawal
a0163693bc net/cxgbevf: do not allocate control queues
Control queues can not be allocated for VFs. So, add check to
only allocate control queues for PFs. This fixes adapter crash
when an attempt is made to allocate control queues for VFs.

Fixes: 3a3aaabc ("net/cxgbe: add control queue to communicate filter requests")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-08-02 11:24:40 +02:00
Shagun Agrawal
217d181626 net/cxgbe: fix null dereference on CLIP failure
Coverity issue: 302872
Fixes: 3f2c1e209c ("net/cxgbe: add Compressed Local IP region")

Signed-off-by: Shagun Agrawal <shaguna@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
2018-08-02 11:03:16 +02:00
Hyong Youb Kim
0caa07034a net/enic: reset VXLAN port during initialization
The NIC persists the vxlan port number across vNIC init/de-init
(e.g. restart testpmd). So, explicitly reset the setting to the
default value (4789) as part of the initialization.

Fixes: 8a4efd1741 ("net/enic: add handlers to add/delete vxlan port number")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-08-02 10:34:04 +02:00
Hyong Youb Kim
d16623dd39 net/enic: revert mbuf fast free offload
This reverts the patch that enabled mbuf fast free.

There are two main reasons.

First, enic_fast_free_wq_bufs is broken. When
DEV_TX_OFFLOAD_MBUF_FAST_FREE is enabled, the driver calls this
function to free transmitted mbufs. This function currently does not
reset next and nb_segs. This is simply wrong as the fast-free flag
does not imply anything about next and nb_segs.

We could fix enic_fast_free_wq_bufs by making it to call
rte_pktmbuf_prefree_seg to reset the required fields. But, it negates
most of cycle saving.

Second, there are customer applications that blindly enable all Tx
offloads supported by the device. Some of these applications do not
satisfy the requirements of mbuf fast free (i.e. a single pool per
queue and refcnt = 1), and end up crashing or behaving badly.

Fixes: bcaa54c1a1 ("net/enic: support mbuf fast free offload")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-08-02 10:26:02 +02:00
Pavan Nikhilesh
efb9dd148e net/octeontx: fix stop clearing Rx/Tx functions
On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes
a SEGFAULT in cases where control path calls stop and a paket is still
being processed by a worker.
Instead clear the fastpath functions in dev_close.

Fixes: da6c687471 ("net/octeontx: add start and stop support")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-08-02 09:59:10 +02:00
Tiwei Bie
62758c768f net/virtio-user: fix parameters string
Add the missing param "server" to param string.
Also add the missing spaces after params.

Fixes: bd8f50a45d ("net/virtio-user: support server mode")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-08-02 04:41:58 +02:00
Tiwei Bie
25760ee803 net/virtio: remove unused offloads macro
This macro isn't used any more after below commit:

Fixes: a4996bd89c ("ethdev: new Rx/Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2018-08-02 04:41:55 +02:00
Tiwei Bie
8855839c5d net/virtio: remove unnecessary Rx error assignments
Remove the unnecessary assignments in Rx functions
as they are useless and misleading.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
2018-08-02 04:41:51 +02:00
Cristian Dumitrescu
1af2dc5111 net/softnic: add command for default tmgr hierarchy
Add support for creating default Traffic Manager (TMGR) hierarchy through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:29:15 +02:00
Cristian Dumitrescu
e1e31efcc9 net/softnic: add command for tmgr hierarchy commit
Add support for Traffic Manager (TMGR) hierarchy commit through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:51 +02:00
Cristian Dumitrescu
f870fe036f net/softnic: add command for tmgr node addition
Add support for adding Traffic Manager (TMGR) hierarchy node through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:26 +02:00
Cristian Dumitrescu
f137ae5c54 net/softnic: add command for tmgr shared shaper
Add support to create Traffic Manager (TMGR) shared shaper through
firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:28:01 +02:00
Cristian Dumitrescu
552e3f72d4 net/softnic: add command for tmgr shaper profile
Add support to create Traffic Manager (TMGR) shaper profile
through firmware CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:27:34 +02:00
Cristian Dumitrescu
c73369e6d1 net/softnic: add command for tmgr create
Add support to create Traffic Manager (TMGR) object through firmware
CLI script.

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
2018-07-25 19:27:07 +02:00
Ferruh Yigit
d1c3ab220a drivers/net: fix crash in secondary process
Calling rte_eth_dev_info_get() on secondary process cause a crash
because eth_dev->device is not set properly.

Fixes: ee27edbe0c ("drivers/net: share vdev data to secondary process")
Cc: stable@dpdk.org

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-26 15:00:34 +02:00
Yaroslav Brustinov
2854ba22c5 net/mlx5: fix linkage of glue lib with gcc 4.7.2
addressing a gcc 4.7.2 bug that cannot be reproduced with latter
versions:

"bin/ld: Warning: alignment 8 of symbol `mlx5_glue' in
src/dpdk/drivers/net/mlx5/mlx5_glue.c.21.o is smaller than 16 in
src/dpdk/drivers/net/mlx5/mlx5_rxq.c.21.o"

Fix it be forcing the alignment of the glue lib.

Fixes: 0e83b8e536 ("net/mlx5: move rdma-core calls to separate file")
Cc: stable@dpdk.org

Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-07-26 14:05:52 +02:00
Adrien Mazarguil
3f8cb05df5 net/mlx5: fix invalid network interface index
Network interface indices being unsigned, an invalid index or error is
normally expressed through a zero value (see if_nametoindex()).

mlx5_ifindex() has a signed return type for negative values in case of
error. Since mlx5_nl.c does not check for errors, these may be fed back as
invalid interfaces indices to subsequent system calls. This usage would
have been correct if mlx5_ifindex() returned a zero value instead.

This patch makes mlx5_ifindex() unsigned for convenience.

Fixes: ccdcba53a3 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-07-26 14:05:52 +02:00
Nelio Laranjeiro
919d53ad78 net/mlx5: fix count query when flow has not counter
Querying a counters on a flow without counter is ending with a
segmentation fault.

Fixes: 60bd8c9747 ("net/mlx5: add count flow action")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2018-07-26 14:05:52 +02:00
Yongseok Koh
24f653a7e8 net/mlx5: fix queue rollback when starting device
mlx5_rxq_start() and mlx5_rxq_stop() must be strictly paired because
internal reference counter is increased or decreased inside. Also,
mlx5_rxq_get() must be paired with mlx5_rxq_release().

Fixes: 7d6bf6b866 ("net/mlx5: add Multi-Packet Rx support")
Fixes: a1366b1a2b ("net/mlx5: add reference counter on DPDK Rx queues")
Fixes: 6e78005a9b ("net/mlx5: add reference counter on DPDK Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2018-07-26 14:05:52 +02:00