Commit Graph

5710 Commits

Author SHA1 Message Date
Ferruh Yigit
18869f97f1 drivers/net: fix link autoneg value for virtual PMDs
These drivers never attempt link speed negotiation. Change link_autoneg
value to ETH_LINK_FIXED to be more accurate and consistent between PMDs.

Fixes: 1e3a958f40 ("ethdev: fix link autonegotiation value")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
2018-04-27 17:34:43 +01:00
Sunil Kumar Kori
175fe7d9eb net/dpaa2: fix the ethdev offload checks
Fixes: 0ebce6129b ("net/dpaa2: support new ethdev offload APIs")

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-04-27 17:34:42 +01:00
Sunil Kumar Kori
c58362184a net/dpaa: fix the ethdev offload checks
Fixes: 16e2c27f4f ("net/dpaa: support new ethdev offload APIs")

Signed-off-by: Sunil Kumar Kori <sunil.kori@nxp.com>
2018-04-27 17:34:42 +01:00
Ferruh Yigit
6db80eb7c9 net/tap: fix icc build
build error:
.../dpdk/drivers/net/tap/rte_eth_tap.c(598):
error #279: controlling expression is constant
	RTE_ASSERT(!"unsupported request type: must not happen");

Although RTE_ASSERT helps debugging this issue when assert enabled,
constant expression in assert means this path can be taken during
runtime and there is no protection against it when assert is disabled.

Adding error log and error return back, replacing RTE_ASSERT.

Fixes: 7748a4b441 ("net/tap: add debug messages")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-04-27 17:34:42 +01:00
Matan Azrad
49dad9028e net/bonding: support flow API
Ethernet devices which are grouped by bonding PMD, aka slaves, are
sharing the same queues and RSS configurations and their Rx burst
functions must be managed by the bonding PMD according to the bonding
architecture.

So, it makes sense to configure the same flow rules for all the bond
slaves to allow consistency in packet flow management.

Add rte flow support to the bonding PMD to manage all flow
configuration to the bonded slaves.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2018-04-27 17:34:42 +01:00
Qi Zhang
a3c83a2527 net/i40e: enable runtime queue setup
Expose the runtime queue configuration capability and enhance
i40e_dev_[rx|tx]_queue_setup to handle the situation when
device already started.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 17:34:42 +01:00
Alejandro Lucero
0c0e46c36b net/nfp: fix mbufs releasing when stop or close
PMDs have the responsibility of releasing mbufs sent through xmit burst
function. NFP PMD attaches those sent mbufs to the TX ring structure,
and it is at the next time a specific ring descriptor is going to be
used when the previous linked mbuf, already transmitted at that point,
is released. Those mbufs belonging to a chained mbuf got its own link
to a ring descriptor, and they are released independently of the mbuf
head of that chain.

The problem is how those mbufs are released when the PMD is stopped or
closed. Instead of releasing those mbufs as the xmit functions does,
this is independently of being in a mbuf chain, the code calls
rte_pktmbuf_free which will release not just the mbuf head in that
chain but all the chained mbufs. The loop will try to release those
mbufs which have already been released again when chained mbufs exist.

This patch fixes the problem using rte_pktmbuf_free_seg instead.

Fixes: b812daadad ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2018-04-27 17:34:42 +01:00
Matan Azrad
4205da3a47 net/vdev_netvsc: prefer netvsc devices in scan
There is an option to run a non-netvsc device as a netvsc device only
when the "force" parameter is set to 1 in the EAL command line.
Consequently, more than one device may be found to be matching the
"mac" parameter specifying the device.

Prefer netvsc devices to be scanned before any non-netvsc device, even
when the "force" parameter is set.

Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-04-27 17:34:42 +01:00
Matan Azrad
118d2f8096 net/vdev_netvsc: add check for specifying by 1 way
There are now 2 ways to specify a netvsc device by the EAL command
line - either by the interface name or by the MAC address.

The user should not specify a netvsc device using more than 1 way,
Thus, if a device is specified in more than 1 way, the driver stops
to probe it.

Validate it in the driver initialization.

Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-04-27 17:34:42 +01:00
Matan Azrad
0b39cc820a net/vdev_netvsc: remove specified devices IP check
If the netvsc driver starts in blacklist mode, it does not
automatically probe IP associated netvsc devices. Therefore, the only
way to probe them is to specify them by the EAL command line, using the
"force" parameter to skip the IP check in the driver.

>From now on, the user does not need to add the "force" parameter if he
specifies an IP associated netvsc device by the EAL command line, and the
responsibility of the IP check is now in the user's hands.

However, in the absence of any specification, the driver still skips IP
associated netvsc devices.

Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
2018-04-27 17:34:42 +01:00
Ophir Munk
519fb2858e net/vdev_netvsc: shorten devices names
Prior to this commit the vdev_netvsc PMD was creating tap and failsafe
devices with long names, such as "net_tap_net_vdev_netvsc0" or
"net_failsafe_net_vdev_netvsc0".
This commits creates tap and failsafe devices with short names such as
"net_tap_netvsc0" or "net_failsafe_netvsc0".

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
2018-04-27 17:34:42 +01:00
Ophir Munk
7eae645a3b net/failsafe: add TCP TSO default Tx capability
Add DEV_TX_OFFLOAD_TCP_TSO to failsafe Tx offload default capabilities.
The net result of failsafe Tx capabilities is the logical AND of Tx
capabilities among all failsafe sub_devices and failsafe own default
capabilities.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2018-04-27 17:34:41 +01:00
Yangchao Zhou
58c18bc114 net/bnx2x: reserve enough headroom for mbuf prepend
When allocating a new mbuf for Rx, the value of m->data_off should be
reset to its default value (RTE_PKTMBUF_HEADROOM), instead of reusing
the previous undefined value, which could cause the packet to have a
too small or too high headroom.

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Harish Patil <harish.patil@cavium.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
d863f19efa net/vmxnet3: skip empty segments in transmission
Packets containing empty segments are dropped by hypervisor, prevent
this case by skipping empty segments in transmission.
Also drop empty mbufs to be sure that at least one segment is transmitted
for each mbuf.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
595d08d105 net/vmxnet3: ignore empty segments in reception
When several TCP fragments are contained in a packet that is only one mbuf
segment long, vmxnet3 receives an empty segment following first one, that
contains offload information. In current version, this segment is
propagated as is to upper application.
Remove those empty segments directly when receiving buffers, they may
generate unneeded extra processing in the upper application.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
ae2705b80d net/vmxnet3: guess MSS if not provided in LRO mode
Not so old variants of vmxnet3 do not provide MSS value along with
LRO packet. When this case happens, try to guess MSS value with
information at hand.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
73c1f32c96 net/vmxnet3: complete Rx offloads support
Add support for IPv6, LRO and properly set packet type in all
supported cases.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
d08e3c90d4 net/vmxnet3: fix Rx offload information in multiseg packets
In case we are working on a multisegment buffer, most bit are set
in last segment of the buffer. Correctly look at those bits in eop part
of the rx_offload function.

Fixes: 2fdd835f99 ("vmxnet3: support jumbo frames")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
5e5ac26f95 net/vmxnet3: gather offload data on first and last segment
Offloads are split between first and last segment of a packet.
Call a single vmxnet3_rx_offload function that will contain all
offload operations. This patch does not introduce any code modification.

Pass a vmxnet3_hw as parameter to the function, it is not presently
used in this patch, but will be later used for TSO offloads.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Didier Pallard
0fbb05bbe3 net/vmxnet3: return unknown IPv4 extension len ptype
Rather than parsing IP header to get proper ptype to return, just return
RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, that tells application that we have an IP
packet with unknown header length.

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 17:34:41 +01:00
Nélio Laranjeiro
3c0db1ab51 net/mlx5: fix flow director mask
During the transition to resurrect flow director on top of rte_flow, mask
handling was removed by mistake.

Fixes: 4c3e9bcdd5 ("net/mlx5: support flow director")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-27 17:34:41 +01:00
Nélio Laranjeiro
ca42b8a8b7 net/mlx5: split L3/L4 in flow director
This will help to bring back the mask handler which was removed when this
feature was rewritten on top of rte_flow.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-27 17:34:40 +01:00
Xueming Li
2323cc3c2e net/mlx5: fix invalid flow item check
This patch fixed invalid flow item check.

Fixes: a6d83b6a92 ("net/mlx5: standardize on negative errno values")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-04-27 17:34:00 +01:00
Yongseok Koh
96525b9e19 net/mlx4: fix alignment of memory region
The memory region is [start, end), so if the memseg of 'end' isn't
allocated yet, the returned memseg will have zero entries and this will
make 'end' zero (nil).

Fixes: c2fe582322 ("net/mlx4: use virt2memseg instead of iteration")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-27 15:54:56 +01:00
Yongseok Koh
a2ceae5940 net/mlx5: fix alignment of memory region
The memory region is [start, end), so if the memseg of 'end' isn't
allocated yet, the returned memseg will have zero entries and this will
make 'end' zero (nil).

Fixes: 718e35999c ("net/mlx5: use virt2memseg instead of iteration")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
c4fed4ff4f net/bnxt: fix mbuf data offset initialization
Initialize mbuf->data_off to RTE_PKTMBUF_HEADROOM after allocation.
Without this, it might be possible that the DMA address provided
to the HW may not be in sync to what is indicated to the application
in bnxt_rx_pkt.

Fixes: 2eb53b134a ("net/bnxt: add initial Rx code")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
1b533790f4 net/bnxt: avoid invalid vnic id in set L2 Rx mask
In some cases bnxt_hwrm_cfa_l2_set_rx_mask is being called before
VNICs are allocated. The FW returns an error in such cases.
Move bnxt_init_nic to bnxt_dev_init such that the ids are initialized
to an invalid id.
Prevent sending the command to the FW only with a valid vnic id.

Fixes: 244bc98b0d ("net/bnxt: set L2 Rx mask")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
e3d8f1e6a6 net/bnxt: cache address of doorbell to subsequent access
While creating TX, Rx, CQ rings use cached DB address instead of
getting it from the PCI memory resource.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Chas Williams
3a14b29bff net/vmxnet3: keep link state consistent
The vmxnet3 never attempts link speed negotiation.  As a virtual device
the link speed is vague at best.  However, it is important for certain
applications, like bonding, to see a consistent link_status.  802.3ad
requires that only links of the same cost (link speed) be enslaved.
Keeping the link status consistent in vmxnet3 avoids races with bonding
enslavement.

Fixes: 1e3a958f40 ("ethdev: fix link autonegotiation value")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 15:54:56 +01:00
Ferruh Yigit
3fef0822ec drivers/net: update link status
Update link status related feature document items and minor updates in
some link status related functions.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-04-27 15:54:56 +01:00
Junjie Chen
8ccb7d6726 net/vhost: update license to SPDX format
Update license to SPDX, also add Intel license.

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Takanari Hayama <taki@igel.co.jp>
2018-04-27 15:54:56 +01:00
Shraddha Joshi
b7f6077374 net/vmxnet3: increase Rx data ring descriptor size
Vmxnet3 driver supports receive data ring viz. a set of small sized
buffers that are always mapped by the emulation. If a packet fits into
the receive data ring buffer, the emulation delivers the packet via the
receive data ring.

Increasing the receive data ring descriptor size from 128 to 256
showed performance gains as high as 5% for packets smaller than 256.

Signed-off-by: Shraddha Joshi <jshraddha@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
Acked-by: Guolin Yang <gyang@vmware.com>
Acked-by: Boon Ang <bang@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
2018-04-27 15:54:56 +01:00
Rasesh Mody
84785018d0 net/bnx2x: make init and driver logtype names consistent
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2018-04-27 15:54:56 +01:00
Rasesh Mody
66ba596aa6 net/bnx2x: fix for PCI FLR after ungraceful exit
This patch provides a fix for PCI function level reset after an
ungraceful exit from an application. The fix is to enable internal
target read as part of device attach before getting device information
from device config space, device itself and shared memory. In addition
to that, add a 200ms delay for the recovery flow to complete.

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

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2018-04-27 15:54:56 +01:00
Adrien Mazarguil
e65f082adb net/bnxt: fix matching of flow API item masks
Some values are interpreted without endian conversion and/or without
taking the proper mask into account.

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

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 15:54:56 +01:00
Adrien Mazarguil
e68744e53e net/mlx5: fix RSS flow action bounds check
The number of queues provided by the application is not checked against
parser's supported maximum.

Fixes: 3d821d6fea ("net/mlx5: support RSS action flow rule")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 15:54:56 +01:00
Adrien Mazarguil
ef134c8daa net/mlx4: fix ignored RSS hash types
When an unsupported hash type is part of a RSS configuration structure, it
is silently ignored instead of triggering an error. This may lead
applications to assume that such types are accepted, while they are in fact
not part of the resulting flow rules.

Fixes: 078b8b452e ("net/mlx4: add RSS flow rule action support")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 15:54:56 +01:00
Adrien Mazarguil
cb43322fbd net/mlx4: fix RSS resource leak in case of error
When memory cannot be allocated for a flow rule, its RSS context reference
is not dropped.

Fixes: 078b8b452e ("net/mlx4: add RSS flow rule action support")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 15:54:56 +01:00
Pavan Nikhilesh
23738dadf3 net/axgbe: fix incorrect cache alignment macro
Due to missing ____cacheline_aligned definition compiler treats it as a
global variable replace it with proper cache alignment macro.

Fixes: 9e89010326 ("net/axgbe: add Rx/Tx setup")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-04-27 15:54:56 +01:00
John Daley
05e8568269 net/enic: fix uninitialized variable
A local variable was used without initialization and triggered a
coverity issue.

Is is fixed here, but there is no ill effect of not initializing
the variable in this case. 'rxq_interrupt_offset' is irrelevant
if 'rxq_interrupt_enable' is not set (the condition caught by
coverity).

Coverity issue: 268314
Fixes: fc2c8c0668 ("net/enic: use Tx completion index instead of messages")
Cc: stable@dpdk.org

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-04-27 15:54:56 +01:00
Nitin Saxena
c77875fbb8 net/thunderx: fix MTU configuration for jumbo packets
thunderx pmd driver passes dev_info.max_rx_pktlen as
9200 (via rte_eth_dev_info_get()) to application.
But, when application tries to set MTU as
(9200 - sizeof(ethernet_header_t)) the operation fails
because of missing CRC and VLAN additions.

This patch fixes the following for thunderx pmd driver:
 - Sets NIC_HW_MAX_FRS to 9216 (instead of 9200)
 - Sets NIC_HW_MAX_MTU to 9190 (NIC_HW_MAX_FRS - ETH_HLEN
   - ETHER_CRC_LEN - 2*VLAN_HLEN)
 - Sets dev_info->max_rx_pkt_len to NIC_HW_MAX_MTU +
   ETH_HLEN (instead of 9200)
 - Allows rte_eth_dev_set_mtu() to pass if application
   (like VPP) calls rte_eth_dev_set_mtu() before
   rte_eth_dev_start() by putting appropriate check for
   dev->data->dev_started

Fixes: 65d9804edc ("net/thunderx: support MTU configuration")
Cc: stable@dpdk.org

Signed-off-by: Nitin Saxena <nitin.saxena@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-04-27 15:54:56 +01:00
Wei Dai
9a7a9072e7 net/ixgbe: fix segfault in configuring VF VLAN strip
This patch fixes a segment fault in ixgbevf_vlan_offload_set( )
when a Rx queue with index < max_rx_queues is not setup.
For such queue, rxq = dev->data->rx_queues[i] is null pointer.

Fixes: 860a94d3c6 ("net/ixgbe: support VLAN strip per queue offloading in VF")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Xueqin Lin <xueqin.lin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-27 15:54:56 +01:00
Wei Dai
03c81b55d8 net/ixgbe: fix missing support of multi-segs offloading
This patch adds missing supported Tx multi-segs offloading.

Fixes: 51215925a3 ("net/ixgbe: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-04-27 15:54:56 +01:00
Helin Zhang
eecae39689 net/ixgbe: add access and locking APIs for MDIO
Add ixgbe MDIO lock/unlock and access APIs to read and write registers
using specific device address. This provides MDIO access to any devices
that are not associated with the autoprobed PHY.Export these APIs via
the map file

Signed-off-by: Shweta Choudaha <shweta.choudaha@att.com>
Reviewed-by: Chas Williams <chas3@att.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-04-27 15:54:56 +01:00
Somnath Kotur
2d10c776c0 net/bnxt: add device ID for Stratus VF
Fixes: 1cd45aeb32 ("net/bnxt: support Stratus VF device")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
23460b4c6a net/bnxt: avoid freeing memzone multiple times
Since we are storing the mem_zone address for each ring created,
we are freeing the same address multiple times.
For example the memory zone created for Rx is being freed during
Rx ring cleanup, AGG ring cleanup and CQ cleanup.
Avoid this by storing the memory zone address in RXQ instead and
free it as a part of queue_release dev_op.
In the same way do the same for TX queues as well.

Fixes: 51c87ebafc ("net/bnxt: add Tx queue create/destroy")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
b22cd7b3c6 net/bnxt: use UINT64_MAX to initialize filter ids
Use UINT64_MAX to initialize l2, ntuple, em filter_id fields
instead of hardcoded -1;

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
f11fd694a8 net/bnxt: free memory allocated for VF filters
Memory allocated to hold VF filter info is not being freed currently.
This can cause potential memory leak.

Fixes: 7a5b087444 ("net/bnxt: support to add a VF MAC address")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
1383434c90 net/bnxt: reset L2 filter id once filter is freed
The fw_l2_filter_id for a ntuple filter is needed only for the lifetime
of the ntuple filter. Once the filter is free, reset the field.
The associated l2_filter will be freed as a part of its own cleanup.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00
Ajit Khaparde
472193a710 net/bnxt: maintain mbuf alloc failure counter per queue
Currently we have a single counter for mbuf alloc failure.
Make it per RxQ instead.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-04-27 15:54:56 +01:00