From 1ebfe1ac52a3356a65f8c5ba7fd0f4f56e18716b Mon Sep 17 00:00:00 2001 From: Daniele Di Proietto Date: Tue, 24 Jun 2014 16:04:20 -0700 Subject: [PATCH] netdev-dpdk: Count and delete every dropped packet Commit f4fd623c4c25 introduced a bug in netdev_dpdk_send(): if multiple consecutive packets exceed MTU, only the first one is deleted and counted. This should fix the bug Signed-off-by: Daniele Di Proietto Acked-by: Thomas Graf Acked-by: Pravin B Shelar --- lib/netdev-dpdk.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 572a645ea..f62897563 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -733,13 +733,13 @@ netdev_dpdk_send(struct netdev *netdev, struct dpif_packet **pkts, int cnt, dpdk_queue_pkts(dev, qid, (struct rte_mbuf **)&pkts[next_tx_idx], i-next_tx_idx); - - VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d", - (int)size , dev->max_packet_len); - - dpif_packet_delete(pkts[i]); - dropped++; } + + VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d", + (int)size , dev->max_packet_len); + + dpif_packet_delete(pkts[i]); + dropped++; next_tx_idx = i + 1; } }