diff mbox series

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

Message ID 1504115149-26864-2-git-send-email-ktraynor@redhat.com
State Accepted
Delegated to: Darrell Ball
Headers show
Series [ovs-dev,1/3] dpif-netdev: Rename rxq_interval. | expand

Commit Message

Kevin Traynor Aug. 30, 2017, 5:45 p.m. UTC
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@intel.com
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/dpif-netdev.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Darrell Ball Aug. 30, 2017, 5:51 p.m. UTC | #1
Thanks Kevin

It is nice of you to fix a pre-existing coding style issue as part of this patch.

Darrell

On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote:

    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@intel.com
    Reported-by: Ilya Maximets <i.maximets@samsung.com>
    Signed-off-by: Kevin Traynor <ktraynor@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
Ciara Loftus Sept. 1, 2017, 9:44 a.m. UTC | #2
> 
> 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@intel.com
> Reported-by: Ilya Maximets <i.maximets@samsung.com>
> Signed-off-by: Kevin Traynor <ktraynor@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

LGTM. Thanks!

Acked-by: Ciara Loftus <ciara.loftus@intel.com>
Darrell Ball Sept. 1, 2017, 9:28 p.m. UTC | #3
I applied the patch to dpdk_merge here

https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_darball_ovs_commits_dpdk-5Fmerge&d=DwIGaQ&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=A2_FCacqbp2moAo3HGFlTuxsjONUGhlN42OBcAuQQ6w&s=b6btPKhgvOFr2GOUYvktND6kaC6jc3fXI-mXfvNgXOU&e=


On 9/1/17, 2:44 AM, "Loftus, Ciara" <ciara.loftus@intel.com> wrote:

    > 
    > 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@intel.com
    > Reported-by: Ilya Maximets <i.maximets@samsung.com>
    > Signed-off-by: Kevin Traynor <ktraynor@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
    
    LGTM. Thanks!
    
    Acked-by: Ciara Loftus <ciara.loftus@intel.com>
diff mbox series

Patch

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);
                 }
             }