distributor: fix crash in flush
authorDavid Hunt <david.hunt@intel.com>
Fri, 14 Apr 2017 08:59:53 +0000 (09:59 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 20 Apr 2017 23:03:35 +0000 (01:03 +0200)
commit917f49cfd0d1fc6c1ae890528835ece018741baa
tree0f2a77a1c592116b3935d7d1fc27a6fe4f9c9667
parent284c908cc588e6448e25199773aea998c7cccd78
distributor: fix crash in flush

Occasionally, the distributor single-packet-at-a-time mode will
segfault because it inadvertently calls some burst mode code when
flushing packets.

This patch ensures that only the v20 (single mode) codepath is used, and
returns without falling through to the burst mode code.

Fixes: 775003ad2f96 ("distributor: add new burst-capable library")

Signed-off-by: David Hunt <david.hunt@intel.com>
Tested-by: Yong Liu <yong.liu@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_distributor/rte_distributor.c