On 11/15/2013 02:19 PM, Thomas Monjalon wrote: > Rings are resetted with a loop because memset cannot be used without > issuing a warning about volatile casting. > The index of the loop was a 16-bit variable which is is sufficient for > ring entries number but not for the byte size of the whole ring. > The overflow happens when rings are configured for 4096 entries > (descriptor size is 16 bytes). The result is an endless loop. > > It is fixed by indexing ring entries and resetting all bytes of the entry > with a simple assignment. > The descriptor initializer is zeroed thanks to its static declaration. > > Signed-off-by: Thomas Monjalon <thomas.monjalon at 6wind.com> > --- > lib/librte_pmd_e1000/igb_rxtx.c | 14 ++++++-------- > lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 10 ++++++---- > 2 files changed, 12 insertions(+), 12 deletions(-) > > Acked-by: Ivan Boule <ivan.boule at 6wind.com>
-- Ivan Boule 6WIND Development Engineer