diff mbox

[PATCHv2] Fix to give back the sent buffers to buffer pool.

Message ID 1405430452-23143-1-git-send-email-venkatesh.vivekanandan@linaro.org
State New
Headers show

Commit Message

Venkatesh Vivekanandan July 15, 2014, 1:20 p.m. UTC
From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>

Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
---
 platform/linux-dpdk/odp_packet_io.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Venkatesh Vivekanandan July 15, 2014, 1:29 p.m. UTC | #1
If at all there are issues in sending traffic between two interfaces, then
this patch must be applied on top of linux-dpdk to give the buffers that
are sent out of tx interface back to the buffer pool.


On 15 July 2014 18:50, <venkatesh.vivekanandan@linaro.org> wrote:

> From: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
>
> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
> ---
>  platform/linux-dpdk/odp_packet_io.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/platform/linux-dpdk/odp_packet_io.c
> b/platform/linux-dpdk/odp_packet_io.c
> index abea0ec..3d4f5d4 100644
> --- a/platform/linux-dpdk/odp_packet_io.c
> +++ b/platform/linux-dpdk/odp_packet_io.c
> @@ -323,6 +323,9 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t
> pkt_table[], unsigned len)
>         if (pktio_entry == NULL)
>                 return -1;
>
> +       if (pktio_entry->s.params.type == ODP_PKTIO_TYPE_DPDK)
> +               odp_pktio_send(id, pkt_table, 0);
> +
>         lock_entry(pktio_entry);
>         switch (pktio_entry->s.params.type) {
>         case ODP_PKTIO_TYPE_SOCKET_BASIC:
> --
> 1.9.1
>
>
diff mbox

Patch

diff --git a/platform/linux-dpdk/odp_packet_io.c b/platform/linux-dpdk/odp_packet_io.c
index abea0ec..3d4f5d4 100644
--- a/platform/linux-dpdk/odp_packet_io.c
+++ b/platform/linux-dpdk/odp_packet_io.c
@@ -323,6 +323,9 @@  int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len)
 	if (pktio_entry == NULL)
 		return -1;
 
+	if (pktio_entry->s.params.type == ODP_PKTIO_TYPE_DPDK)
+		odp_pktio_send(id, pkt_table, 0);
+
 	lock_entry(pktio_entry);
 	switch (pktio_entry->s.params.type) {
 	case ODP_PKTIO_TYPE_SOCKET_BASIC: