luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.85k stars 534 forks source link

num_slots on RX rings are zero #950

Open cygnus2048 opened 6 months ago

cygnus2048 commented 6 months ago

I was using the ixgbevf driver @ commit 67901e07d8895d58186616ba78b04bfd8df3bcb5 and all was functioning well. I then went to commit 1bf288e0445d0a31261e772d376599549a4091ef to also get ICE driver support, however, I now do not receive any packets at all and adding some debug I show that the num_slots on the RX rings are set to zero. Note I am still using the ixgbevf driver.

I did verify TX is functioning and the far-end device is indeed receiving the TX packets.

NIOCGINFO shows the following:

    if (ioctl(dev_fd, NIOCGINFO, &nm_req))
    log_info("    Version: %d, hw tx/rx rings: %d/%d, tx/rx slots: %d/%d", nm_req.nr_version, nm_req.nr_tx_rings, nm_req.nr_rx_rings,
                                                                           nm_req.nr_tx_slots, nm_req.nr_rx_slots);

INFO (inst: 0): Version: 14, hw tx/rx rings: 2/2, tx/rx slots: 1024/1600

        auto rxring = NETMAP_RXRING(pNetmapdev->nifp, pNetmapdev->first_rx_ring);
        log_info("Thread %d, Queue %d: rxring %d (max %d) buffer size %d slots %d", uInstance, uQueueIdx, (int)pNetmapdev->first_rx_ring,
                 (int)pNetmapdev->last_rx_ring, (int)rxring->nr_buf_size, (int)rxring->num_slots);

INFO (inst: 0): Thread 0, Queue 0: rxring 0 (max 0) buffer size 0 slots 0 INFO (inst: 0): Thread 0, Queue 1: rxring 1 (max 1) buffer size 0 slots 0

Thanks for any help.

giuseppelettieri commented 6 months ago

I just tried with the latest master and it appears to work. May you switch to the most recent commit, please? Note, by the way, that the initial support for ICE was completely broken, so you may want to use master anyway.

cygnus2048 commented 6 months ago

Ok, I will give that a try. However, when I tried the latest about a year ago, I saw a regression in performance on ixgbevf compared to the commit https://github.com/luigirizzo/netmap/commit/67901e07d8895d58186616ba78b04bfd8df3bcb5 so that is why I was trying to stay as close to that as possible. That said, my primary goal is to build the ICE driver, so I can look into any other issues later. For now, I opened another ticket for building the ice driver as I am getting many errors when trying to build that @master. Thanks.