[ovs-dev] [PATCH 2/3] dpif-netdev: Fix a couple of coding style issues.

Kevin Traynor ktraynor at redhat.com
Wed Aug 30 17:45:48 UTC 2017


A couple of trivial fixes for a ternery operator placement
and pointer declaration.

Fixes: 655856ef39b9 ("dpif-netdev: Change rxq_scheduling to use rxq processing cycles.")
Fixes: a2ac666d5265 ("dpif-netdev: Change definitions of 'idle' & 'processing' cycles")
Cc: ciara.loftus at intel.com
Reported-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 lib/dpif-netdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 55d5656..1db9f10 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3429,6 +3429,6 @@ static int
 rxq_cycle_sort(const void *a, const void *b)
 {
-    struct dp_netdev_rxq * qa;
-    struct dp_netdev_rxq * qb;
+    struct dp_netdev_rxq *qa;
+    struct dp_netdev_rxq *qb;
     uint64_t total_qa, total_qb;
     unsigned i;
@@ -3865,7 +3865,8 @@ dpif_netdev_run(struct dpif *dpif)
                                                    port->rxqs[i].rx,
                                                    port->port_no);
-                    cycles_count_intermediate(non_pmd, NULL, process_packets ?
-                                                       PMD_CYCLES_PROCESSING
-                                                     : PMD_CYCLES_IDLE);
+                    cycles_count_intermediate(non_pmd, NULL,
+                                              process_packets
+                                              ? PMD_CYCLES_PROCESSING
+                                              : PMD_CYCLES_IDLE);
                 }
             }
-- 
1.8.3.1



More information about the dev mailing list