e1000: fix descriptor overflow
authorIntel <intel.com>
Wed, 18 Sep 2013 10:00:00 +0000 (12:00 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 9 Oct 2013 14:16:14 +0000 (16:16 +0200)
Allow rxq->rx_tail + offset > 65535
in eth_em_rx_descriptor_done().

Signed-off-by: Intel
lib/librte_pmd_e1000/em_rxtx.c

index 0bebfe2..c049542 100644 (file)
@@ -1449,7 +1449,7 @@ eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset)
 {
        volatile struct e1000_rx_desc *rxdp;
        struct em_rx_queue *rxq = rx_queue;
-       uint16_t desc;
+       uint32_t desc;
 
        if (unlikely(offset >= rxq->nb_rx_desc))
                return 0;