diff mbox

[API-NEXT,v3,2/9] packet_socket: do not release packets in odp_pktio_send

Message ID 1433526691-20058-3-git-send-email-zoltan.kiss@linaro.org
State Superseded
Headers show

Commit Message

Zoltan Kiss June 5, 2015, 5:51 p.m. UTC
It happens with ODP_PKTIO_TYPE_SOCKET_BASIC.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 platform/linux-generic/odp_packet_socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_packet_socket.c b/platform/linux-generic/odp_packet_socket.c
index 9272146..0526166 100644
--- a/platform/linux-generic/odp_packet_socket.c
+++ b/platform/linux-generic/odp_packet_socket.c
@@ -276,7 +276,7 @@  int send_pkt_sock_basic(pkt_sock_t *const pkt_sock,
 	unsigned i;
 	unsigned flags;
 	int sockfd;
-	int nb_tx;
+	unsigned nb_tx;
 	int ret;
 
 	sockfd = pkt_sock->sockfd;
@@ -301,7 +301,7 @@  int send_pkt_sock_basic(pkt_sock_t *const pkt_sock,
 	}			/* end while */
 	nb_tx = i;
 
-	for (i = 0; i < len; i++)
+	for (i = 0; i < nb_tx; i++)
 		odp_packet_free(pkt_table[i]);
 
 	return nb_tx;