Commit Graph

13959 Commits

Author SHA1 Message Date
John Daley
2c06cebeb9 net/enic: cap Rx packet processing to end of desc ring
In the default Rx handler stop processing packets at the end of
the completion ring so that wrapping doesn't have to be checked
in the inner while loop.

Also, check the color bit in the completion without using a conditional.

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
2018-07-03 01:54:27 +02:00
John Daley
35e2cb6a17 net/enic: add simple Rx handler
Add an optimized Rx handler for non-scattered Rx.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:26 +02:00
Hyong Youb Kim
5a12c38740 net/enic: check maximum packet size in Tx prepare handler
The default tx handler checks the maximum packet size. Check it in the
prepare handler too. WQ stops working if the app/driver tries to send
oversized packets, so these checks are unavoidable.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:25 +02:00
Hyong Youb Kim
ed933c35ca net/enic: add the simple version of Tx handler
Add a much-simplified handler that works when all offloads are
disabled, except mbuf fast free. When compared against the default
handler, under ideal conditions, cycles per packet drop by 60+%.
The driver tries to use the simple handler first.

The idea of using specialized/simplified handlers is from the Intel
and Mellanox drivers.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:23 +02:00
Hyong Youb Kim
c55614d102 net/enic: reduce Tx completion updates
Request one completion update per roughly 32 buffers. It saves DMA
resources on the NIC, PCIe utilization, and cache miss rates.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:22 +02:00
Hyong Youb Kim
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-07-03 01:54:20 +02:00
Hyong Youb Kim
d355a942b1 net/enic: use mbuf pointer array for inflight Tx packets
WQ is currently using vnic_wq_buf to store mbuf pointers for Tx
packets. But, it contains an unused mempool pointer and mbuf is
unnecessarily cast to void pointer. Remove vnic_wq_buf entirely and
use an mbuf pointer array instead.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:19 +02:00
Hyong Youb Kim
8a4efd1741 net/enic: add handlers to add/delete vxlan port number
The NIC has one configurable VXLAN port, which is set to the default
4789 upon vNIC reset. Adding a non-default port replaces this single
VXLAN port. Deleting the previously added non-default port restores
the VXLAN port to the hardware default.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:17 +02:00
Hyong Youb Kim
e39c2756e2 net/enic: add devarg to specify ingress VLAN rewrite mode
Add a new devarg "ig-vlan-rewrite" to allow the user to set
non-default rewrite mode. The UCS VIC may add/remove/modify the VLAN
header of an ingress packet depending on the ingress VLAN rewrite
mode.

By default, the driver sets the pass-through mode, which tells the NIC
"do not touch VLAN header and preserve it as is". This mode is usually
sufficient, but can complicate deployments for certain environments.
For example, OVS-DPDK in UCS blade environments may want to use "untag
default VLAN mode", which removes the VLAN header from an ingress
packet if it matches vNIC's default VLAN.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:15 +02:00
Hyong Youb Kim
9466a38d38 net/enic: report ring limits and preferred default values
Report min/max ring sizes, alignments, and so on, and rely on the
common checks implemented in the rte_ethdev layer.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:54:12 +02:00
Hyong Youb Kim
1c7c3ad1a0 net/enic: initialize RQ fetch index before enabling RQ
The fetch index must be initialized only when RQ is
disabled. Otherwise, it may lead to stale entries in IG descriptor
cache on the VIC.

Fixes: a74629cfa3 ("net/enic: enable RQ first and then post Rx buffers")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:53:57 +02:00
Hyong Youb Kim
2a7e3d5465 net/enic: do not overwrite admin Tx queue limit
Currently, enic_alloc_wq (via rte_eth_tx_queue_setup) may overwrite
the admin limit with a lower value. This is wrong as seen in the
following sequence.

1. UCS admin-set Tx queue limit (config.wq_desc_count) = 4096
2. Set up tx queue with 512 descriptors
   The admin limit (config.wq_desc_count) becomes 512.
3. Stop ports and now set up Tx queue with 1024 descriptors.
   This fails because 1024 is greater than the admin limit (512).

Do not modify the admin limit, and when queried, report the current
number of descriptors instead of the admin limit. The rx queue setup
(enic_alloc_rq) does not this problem.

Fixes: fefed3d1e6 ("enic: new driver")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:53:44 +02:00
Hyong Youb Kim
5bc989e6db net/enic: update the UDP RSS detection mechanism
The UDP RSS interface has changed in the release firmware for 100G VIC
adapters. The capability bit is now in NIC_CFG. Also the driver is
supposed to use CMD_NIC_CFG_CHK and check if RSS config is
successful. No more changes are expected with respect to UDP RSS API.

Fixes: 94c3518958 ("net/enic: update UDP RSS controls")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:53:26 +02:00
Hyong Youb Kim
15666e5309 net/enic: fix receive packet types
Fix missing or incorrect packet types discovered by DTS.
- Non-IP inner packets
  Set the tunnel flag.
- Inner Ethernet packets
  All supported tunnel packets have Ethernet as inner packets. So, set
  INNER_L2_ETHER for all tunnel types.
- IPv4 fragments carrying TCP/UDP
  The NIC indicates TCP/UDP based on the protocol in IP header. For
  fragments, ignore that bit and always set L4_FRAG.
- IPv6 fragments
  The NIC does regconize fragments (IPv6 packets with fragment extension
  headers). Set packet types for these.

Fixes: 93fb21fdbe ("net/enic: enable overlay offload for VXLAN and GENEVE")
Cc: stable@dpdk.org

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2018-07-03 01:49:51 +02:00
Moti Haimovsky
c4fbea4bce net/mlx4: refine Rx packet type report
This commit refines the Rx Packet type flags reported by the PMD
for each packet being received in order to make the report more
accurate.

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2018-07-03 01:35:58 +02:00
Wei Zhao
e48a9fc364 net/e1000: support descriptor status API
rte_eth_rx_descritpr_status and rte_eth_tx_descriptor_status
are supported by igb VF.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-03 01:35:58 +02:00
Wei Zhao
b7102e98fa net/fm10k: support descriptor status API
rte_eth_rx_descritpr_status and rte_eth_tx_descriptor_status
are supported by fm10K.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2018-07-03 01:35:58 +02:00
Qi Zhang
864a800d70 net/i40e: remove VF interrupt handler
For i40evf, internal rx interrupt and adminq interrupt share the same
source, that cause a lot cpu cycles be wasted on interrupt handler
on rx path. This is complained by customers which require low latency
(when set I40E_ITR_INTERVAL to small value), but have to be sufferred by
tremendous interrupts handling that eat significant CPU resources.

The patch disable pci interrupt and remove the interrupt handler,
replace it with a low frequency (50ms) interrupt polling daemon
which is implemented by registering a alarm callback periodly, this
save CPU time significently: On a typical x86 server with 2.1GHz CPU,
with low latency configure (32us) we saw CPU usage from top commmand
reduced from 20% to 0% on management core in testpmd).

Also with the new method we can remove compile option: I40E_ITR_INTERVAL
which is used to balance between low latency and low CPU usage previously.
Now we don't need it since we can reach both at same time.

Suggested-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
41e45c9056 net/virtio: advertise support in-order feature
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
8f3bd7e870 net/virtio: add in-order Rx/Tx into selection
After IN_ORDER Rx/Tx paths added, need to update Rx/Tx path selection
logic.

Rx path select logic: If IN_ORDER and merge-able are enabled will select
IN_ORDER Rx path. If IN_ORDER is enabled, Rx offload and merge-able are
disabled will select simple Rx path. Otherwise will select normal Rx
path.

Tx path select logic: If IN_ORDER is enabled will select IN_ORDER Tx
path. Otherwise will select default Tx path.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
e5f456a98d net/virtio: support in-order Rx and Tx
IN_ORDER Rx function depends on merge-able feature. Descriptors
allocation and free will be done in bulk.

Virtio dequeue logic:
    dequeue_burst_rx(burst mbufs)
    for (each mbuf b) {
            if (b need merge) {
                    merge remained mbufs
                    add merged mbuf to return mbufs list
            } else {
                    add mbuf to return mbufs list
            }
    }
    if (last mbuf c need merge) {
            dequeue_burst_rx(required mbufs)
            merge last mbuf c
    }
    refill_avail_ring_bulk()
    update_avail_ring()
    return mbufs list

IN_ORDER Tx function can support offloading features. Packets which
matched "can_push" option will be handled by simple xmit function. Those
packets can't match "can_push" will be handled by original xmit function
with in-order flag.

Virtio enqueue logic:
    xmit_cleanup(used descs)
    for (each xmit mbuf b) {
            if (b can inorder xmit) {
                    add mbuf b to inorder burst list
                    continue
            } else {
                    xmit inorder burst list
                    xmit mbuf b by original function
            }
    }
    if (inorder burst list not empty) {
            xmit inorder burst list
    }
    update_avail_ring()

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
7f9934d5ac net/virtio: extract common part for in-order functions
IN_ORDER virtio-user Tx function support Tx checksum offloading and
TSO which also support on normal Tx function. So extracts common part
into separated function for reuse.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
7097ca1bcf net/virtio: free in-order descriptors before device start
Add new function for freeing IN_ORDER descriptors. As descriptors will
be allocated and freed sequentially when IN_ORDER feature was
negotiated. There will be no need to utilize chain for freed descriptors
management, only index update is enough.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
488ed97a20 net/virtio-user: add mrg-rxbuf and in-order vdev parameters
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and
VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update
corresponding unsupported feature bit.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
7c66ff6144 net/virtio-user: add unsupported features mask
This patch introduces unsupported features mask for virtio-user device.
For virtio-user server mode, when reconnecting virtio-user will retrieve
vhost device features as base and then unmask unsupported features.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
9f233f54aa net/virtio: add in-order feature bit definition
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in
ring order: starting from offset 0 in the table, and wrapping around at
the end of the table. Also introduce use_inorder_[rt]x flag for
selection of IN_ORDER [RT]x handlers.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Marvin Liu
22d2e78840 vhost: advertise support in-order feature
If devices always use descriptors in the same order in which they have
been made available. These devices can offer the VIRTIO_F_IN_ORDER
feature. If negotiated, this knowledge allows devices to notify the use
of a batch of buffers to virtio driver by only writing used ring index.

Vhost user device has supported this feature by default. If vhost
dequeue zero is enabled, should disable VIRTIO_F_IN_ORDER as vhost can’t
assure that descriptors returned from NIC are in order.

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-03 01:35:58 +02:00
Somnath Kotur
246c5cc5f0 net/bnxt: use correct flags during VLAN configuration
Setting of VLAN filter cmd was being done with incorrect flag value.
We need to use inner vlan fields instead of outer vlan.

Fixes: 7fe5668d2e ("net/bnxt: support VLAN filter and strip")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
0a256e4a54 net/bnxt: fix Rx ring count limitation
Fixed size of fw_grp_ids in VNIC is limiting the number of Rx rings
being created. With this patch we are allocating fw_grp_ids dynamically,
allowing us to get over this artificial limit.

Fixes: 9738793f28 ("net/bnxt: add VNIC functions and structs")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
6d8109bcb3 net/bnxt: check VF resources if resource manager is enabled
If HWRM resource manager is enabled, check VF resources before proceeding.
Make sure there are enough resources allocated and return an error in case
of insufficient error.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Somnath Kotur
16fea16455 net/bnxt: fix to move a flow to a different queue
While moving a flow to a different destination queue,
the l2_filter_id being passed to the FW command was incorrect.
Fix it by re-using the matching filter's l2_filter_id since
that is supposed to be the same in this case.

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-07-03 01:35:58 +02:00
Ajit Khaparde
569a0e82a4 net/bnxt: allocate RSS context only if RSS mode is enabled
allocate RSS context only if RSS mode is enabled.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
90362583e2 net/bnxt: fix incorrect IO address handling in Tx
rte_mbuf_data_iova returns a 64-bit address. But we are incorrectly
using only 32-bits of that. Use rte_cpu_to_le_64 instead of
rte_cpu_to_le_32

Fixes: 6eb3cc2294 ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
e80e88a097 net/bnxt: fix set MTU
There is no need to update bnxt_hwrm_vnic_plcmode_cfg if new MTU is
not greater than the max data the mbuf can accommodate.

Fixes: daef48efe5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
0cc1fcdeb5 net/bnxt: check filter type before clearing it
In bnxt_free_filter_mem(), check the filter type and call the
appropriate HWRM command to clear the filter from HW.

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

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Somnath Kotur
82dbef2c85 net/bnxt: revert reset of L2 filter id
The L2 filter id is needed in many scenarios particularly when
we are repurposing the same ntuple filter with different destination
queues. This patch reverts a commit in which the L2 filter id was being
reset in clear_ntuple_filter().

Fixes: 1383434c90 ("net/bnxt: reset L2 filter id once filter is freed")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
2018-07-03 01:35:58 +02:00
Xiaoxin Peng
b2a4a69f7b net/bnxt: fix Tx with multiple mbuf
When using multi-mbuf to xmit large packets, we need to use total
packet lengths (sum of all segments) to set txbd->flags_type.
Packets will not be sent when using tx_pkt->data_len(The first
segment of packets).

Fixes: 6eb3cc2294 ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org

Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Reviewed-by: Herry Chen <herry.chen@broadcom.com>
Reviewed-by: Jason He <jason.he@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Rob Miller
420fe4fe1d net/bnxt: update HWRM API to v1.9.2.9
update HWRM API to v1.9.2.9

Signed-off-by: Rob Miller <rob.miller@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
2018-07-03 01:35:58 +02:00
Jay Ding
e9950366d0 net/bnxt: check for invalid vNIC id
Passing an invalid fw_vnic_id to the firmware will cause the
bnxt_hwrm_vnic_plcmode_cfg command to fail.
Add a check for VNIC id before sending message to firmware.

Fixes: daef48efe5 ("net/bnxt: support set MTU")
Cc: stable@dpdk.org

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
5c1171c972 net/bnxt: refactor filter/flow
In preparation of more rte_flow support it has been decided to
separate out filter and flow into their own files. Functionally the
same.

Signed-off-by: Michael Wildt <michael.wildt@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Scott Branden
4a2361df8f net/bnxt: move function check zero bytes
Move check_zero_bytes into new bnxt_util.h file.

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
14255b3515 net/bnxt: fix queue start/stop operations
Packets destined to the to-be-stopped queue should not be dropped
(neither in HW nor in the driver), so re-program the RSS Table without
this queue on stop and add it back to the table on start unless it
is a Representor VF.

Since 0th entry is used for default ring, use fw_grp_id + 1 to change
the RSS table population logic by programming valid IDs instead of the
default zeroth entry in case of an invalid fw_grp_id.

Destroy and recreate the trio of Rx rings(compl, Rx, AG) every time in
start so that HW is in sync with software.

Fixes: 9b63c6fd70 ("net/bnxt: support Rx/Tx queue start/stop")
Cc: stable@dpdk.org

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
12853bb6f7 net/bnxt: support a StingRay VF id
Add support for StingRay VF device 0xd800

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
f10258e39e net/bnxt: fix HW Tx checksum offload check
Add more checks for checksum calculation offload.
Also check for tunnel frames and select the proper
buffer descriptor size.

Fixes: 6eb3cc2294 ("net/bnxt: add initial Tx code")
Cc: stable@dpdk.org

Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Jason He <jason.he@broadcom.com>
Reviewed-by: Qingmin Liu <qingmin.liu@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
5c38c04f9a net/bnxt: set ring coalesce parameters for Stratus NIC
Set ring coalesce parameters for Stratus NIC.
Other skews don't necessarily need this.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
3c2e87c10b net/bnxt: fix close operation
We are not cleaning up all the memory and also not unregistering
the driver during device close operation. This patch fixes the issue.

Fixes: 8930749513 ("net/bnxt: free memory in close operation")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
6a68c813fd net/bnxt: set descriptor rings limits
Set MIN and MAX descriptor count for TX and RX rings.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
637e34befd net/bnxt: optimize Rx processing
1) Use nb_rx_pkts instead of checking producer indices of Rx and
aggregator rings to decide if any Rx completions were processed.
2) Post Rx buffers early in Rx processing instead of waiting for
the budgeted burst quota.
3) Ring Rx CQ DB after Rx buffers are posted.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
5735eb2419 net/bnxt: support Tx batching
Batch more than one Tx requests such that only one completion
is generarted by the HW. We request a Tx completion for first
and last Tx request in the batch.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00
Ajit Khaparde
a15fd8c005 net/bnxt: fix clear port stats
PORT_CLR_STATS is not allowed for VFs, NPAR, MultiHost functions
or when SR-IOV is enabled.
Don't send the HWRM command in such cases.

Fixes: bfb9c2260b ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2018-07-03 01:35:58 +02:00