diff mbox

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

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

Commit Message

Venkatesh Vivekanandan July 11, 2014, 6:36 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 11, 2014, 6:39 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 12 July 2014 00:06, <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: