[dpdk-dev] [PATCH 1/3] port: added WRITER_APPROACH == 1 implementation to ring port

David Marchand david.marchand at 6wind.com
Mon Mar 30 22:50:36 CEST 2015


On Mon, Mar 30, 2015 at 11:56 AM, Maciej Gajdzica <
maciejx.t.gajdzica at intel.com> wrote:

> Added better optimized implementation of tx_bulk for ring writer port
> based on
> similar solution in ethdev_writer port. New implementation sends burst
> without
> copying data to internal buffer if it is possible.
>

Well, if this is such a better implementation, then remove the old one.
We don't want dead code.


>
> ---
>  lib/librte_port/rte_port_ring.c |   59
> +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
>
> diff --git a/lib/librte_port/rte_port_ring.c
> b/lib/librte_port/rte_port_ring.c
> index fa3d77b..ba2eeb3 100644
> --- a/lib/librte_port/rte_port_ring.c
> +++ b/lib/librte_port/rte_port_ring.c
> @@ -96,11 +96,14 @@ rte_port_ring_reader_free(void *port)
>  /*
>   * Port RING Writer
>   */
> +#define RTE_PORT_RING_WRITER_APPROACH                  1
> +
>

Seriously, can't we just drop this ?

Having build options everywhere is a pain.
Having this kind of stuff is worse ...

I can see other places that do the same, are these parts maintained ?


-- 
David Marchand


More information about the dev mailing list