[dpdk-dev] [PATCH v5 03/15] distributor: do not use oldpkt when not needed

David Hunt david.hunt at intel.com
Thu Oct 8 10:13:35 CEST 2020


Hi Lukasz,

On 8/10/2020 6:23 AM, Lukasz Wojciechowski wrote:
> rte_distributor_request_pkt and rte_distributor_get_pkt dereferenced
> oldpkt parameter when in RTE_DIST_ALG_SINGLE even if number
> of returned buffers from worker to distributor was 0.
>
> This patch passes NULL to the legacy API when number of returned
> buffers is 0. This allows passing NULL as oldpkt parameter.
>
> Distributor tests are also updated passing NULL as oldpkt and
> 0 as number of returned packets, where packets are not returned.
>
> Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
> Cc: david.hunt at intel.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
> ---


Good edge-case catch, thanks.

Acked-by: David Hunt <david.hunt at intel.com>




More information about the dev mailing list