net/virtio: remove blank lines in log
[dpdk.git] / drivers / net / virtio / virtio_rxtx.c
index d0365ce..501ca15 100644 (file)
@@ -706,8 +706,14 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,
        }
        vq->vq_free_thresh = rx_free_thresh;
 
-       if (nb_desc == 0 || nb_desc > vq->vq_nentries)
+       /*
+        * For split ring vectorized path descriptors number must be
+        * equal to the ring size.
+        */
+       if (nb_desc > vq->vq_nentries ||
+           (!virtio_with_packed_queue(hw) && hw->use_vec_rx)) {
                nb_desc = vq->vq_nentries;
+       }
        vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);
 
        rxvq = &vq->rxq;
@@ -768,10 +774,11 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
                                if (unlikely(error)) {
                                        for (i = 0; i < free_cnt; i++)
                                                rte_pktmbuf_free(pkts[i]);
+                               } else {
+                                       nbufs += free_cnt;
                                }
                        }
 
-                       nbufs += free_cnt;
                        vq_update_avail_idx(vq);
                }
        } else {
@@ -847,7 +854,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
        if (tx_free_thresh >= (vq->vq_nentries - 3)) {
                PMD_DRV_LOG(ERR, "tx_free_thresh must be less than the "
                        "number of TX entries minus 3 (%u)."
-                       " (tx_free_thresh=%u port=%u queue=%u)\n",
+                       " (tx_free_thresh=%u port=%u queue=%u)",
                        vq->vq_nentries - 3,
                        tx_free_thresh, dev->data->port_id, queue_idx);
                return -EINVAL;