event/sw: simplify counter assignment
authorVipin Varghese <vipin.varghese@intel.com>
Tue, 27 Feb 2018 21:10:22 +0000 (02:40 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 16 Apr 2018 08:07:50 +0000 (10:07 +0200)
Counter variable 'out_pkts' had been set to 0, then updated. Current
code change elimates double assignment to direct assignment.

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
drivers/event/sw/sw_evdev_scheduler.c

index 9143b93..e3a41e0 100644 (file)
@@ -532,8 +532,7 @@ sw_event_schedule(struct rte_eventdev *dev)
                } while (in_pkts > 4 &&
                                (int)in_pkts_this_iteration < sched_quanta);
 
-               out_pkts = 0;
-               out_pkts += sw_schedule_qid_to_cq(sw);
+               out_pkts = sw_schedule_qid_to_cq(sw);
                out_pkts_total += out_pkts;
                in_pkts_total += in_pkts_this_iteration;