[ovs-dev] [PATCH v2 1/2] netdev-dpdk: Fix vHost stats.

Daniele Di Proietto diproiettod at vmware.com
Thu Aug 18 20:28:25 UTC 2016






On 18/08/2016 06:50, "Stokes, Ian" <ian.stokes at intel.com> wrote:

>> This patch introduces function 'netdev_dpdk_filter_packet_len()' which is
>> intended to find and remove all packets with 'pkt_len > max_packet_len'
>> from the Tx batch.
>> 
>> It fixes inaccurate counting of 'tx_bytes' in vHost case if there was
>> dropped packets and allows to simplify send function.
>> 
>> Fixes: 0072e931b207 ("netdev-dpdk: add support for jumbo frames")
>> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
>> ---
>>  lib/netdev-dpdk.c | 52 +++++++++++++++++++++++++++++---------------------
>> --
>>  1 file changed, 29 insertions(+), 23 deletions(-)
>> 
>
>LGTM,
>
>Acked-by: Ian Stokes <ian.stokes at intel.com>

Thanks

I've rolled in the following incremental, which appears to improve the throughput slightly on my system

index 59ae32e..d63e176 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1449,9 +1449,13 @@ netdev_dpdk_filter_packet_len(struct netdev_dpdk *dev, struct rte_mbuf **pkts,
             VLOG_WARN_RL(&rl, "%s: Too big size %" PRIu32 " max_packet_len %d",
                          dev->up.name, pkt->pkt_len, dev->max_packet_len);
             rte_pktmbuf_free(pkt);
-        } else if (i != cnt++) {
-            pkts[cnt - 1] = pkt;
+            continue;
+        }
+
+        if (OVS_UNLIKELY(i != cnt)) {
+            pkts[cnt] = pkt;
         }
+        cnt++;
     }
 
     return cnt;


and applied this to master and branch-2.6

Thanks again,

Daniele


More information about the dev mailing list