You are right, turns out this was just an anomaly in performance. Please ignore the comment in the commit message.
I still recommend this be pushed as these annotations also exist in netdev_dpdk_send() for similar functionality. (Again, remove the comment on performance in my commit message if you decide to commit it). Ryan On 6/30/14 11:15 AM, "Pravin Shelar" <pshe...@nicira.com> wrote: >On Thu, Jun 26, 2014 at 6:16 PM, Ryan Wilson <wr...@nicira.com> wrote: >> Since dropped packets due to large packet size or lack of memory >> are unlikely, it is best to add OVS_UNLIKELY annotations to these >> conditions. >> >> With DPDK fast path forwarding test, this increased throughtput >> from 4.12 to 4.16 million packets per second. >> >I am not sure what do you mean by forwarding case, when forwarding >from one dpdk to another dpdk port, there should not be any copy >operation. Therefore dpdk_do_tx_copy() does not effect performance. > > >> Signed-off-by: Ryan Wilson <wr...@nicira.com> >> --- >> lib/netdev-dpdk.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c >> index 0aee14e..03f1e02 100644 >> --- a/lib/netdev-dpdk.c >> +++ b/lib/netdev-dpdk.c >> @@ -664,7 +664,7 @@ dpdk_do_tx_copy(struct netdev *netdev, struct >>dpif_packet ** pkts, int cnt) >> >> for (i = 0; i < cnt; i++) { >> int size = ofpbuf_size(&pkts[i]->ofpbuf); >> - if (size > dev->max_packet_len) { >> + if (OVS_UNLIKELY(size > dev->max_packet_len)) { >> VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d", >> (int)size , dev->max_packet_len); >> >> @@ -688,7 +688,7 @@ dpdk_do_tx_copy(struct netdev *netdev, struct >>dpif_packet ** pkts, int cnt) >> newcnt++; >> } >> >> - if (dropped) { >> + if (OVS_UNLIKELY(dropped)) { >> ovs_mutex_lock(&dev->mutex); >> dev->stats.tx_dropped += dropped; >> ovs_mutex_unlock(&dev->mutex); >> -- >> 1.7.9.5 >> >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> >>https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman >>/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=TfBS78Vw3dzttvXidhbff >>g%3D%3D%0A&m=hNBS1XKsAIqgIZpR0VZShVX68mpL1Yu56yqm5OiOgEQ%3D%0A&s=a18d0f09 >>534ec17cd2362d51b1028a9400739a21e4300f6319a039ed1e16df07 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev