net/virtio: revert not claiming LRO support
[dpdk.git] / drivers / net / virtio / virtio_rxtx_simple_neon.c
index 793eefb..6b40c7f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *   BSD LICENSE
  *
- *   Copyright (C) Cavium networks Ltd. 2016
+ *   Copyright (C) Cavium, Inc. 2016
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -13,7 +13,7 @@
  *       notice, this list of conditions and the following disclaimer in
  *       the documentation and/or other materials provided with the
  *       distribution.
- *     * Neither the name of Cavium networks nor the names of its
+ *     * Neither the name of Cavium, Inc nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
@@ -72,12 +72,13 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 {
        struct virtnet_rx *rxvq = rx_queue;
        struct virtqueue *vq = rxvq->vq;
+       struct virtio_hw *hw = vq->hw;
        uint16_t nb_used;
        uint16_t desc_idx;
        struct vring_used_elem *rused;
        struct rte_mbuf **sw_ring;
        struct rte_mbuf **sw_ring_end;
-       uint16_t nb_pkts_received;
+       uint16_t nb_pkts_received = 0;
 
        uint8x16_t shuf_msk1 = {
                0xFF, 0xFF, 0xFF, 0xFF, /* packet type */
@@ -106,6 +107,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                0, 0
        };
 
+       if (unlikely(hw->started == 0))
+               return nb_pkts_received;
+
        if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
                return 0;