Date: Sat, 14 Nov 2015 00:30:39 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: freebsd-stable@freebsd.org Subject: NETMAP and off-by-one? Message-ID: <20151113213039.GK48728@zxy.spb.ru>
next in thread | raw e-mail | index | archive | help
I am see strange things: like NETMAP stop transmit after `head` and `cur` touch `tail`. But: /* * check if space is available in the ring. */ static inline int nm_ring_empty(struct netmap_ring *ring) { return (ring->cur == ring->tail); } i.e. if cur == (tail-1) mod ring_size -- space is available in the ring and I can put packet in output buffer. After put this packet ring is full, but no transmiting. This is bug?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151113213039.GK48728>