Message ID | 1504115149-26864-1-git-send-email-ktraynor@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,1/3] dpif-netdev: Rename rxq_interval. | expand |
Thanks Kevin
Naming is hard.
The name looks a bit more intuitive and matches closely with the description previously added.
Darrell
On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote:
rxq_interval was added before there was other #defines
and code related to rxq intervals.
Rename to rxq_next_cycles_store in order to make it more intuitive.
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/dpif-netdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 071ec14..55d5656 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread {
/* End of the next time interval for which processing cycles
are stored for each polled rxq. */
- long long int rxq_interval;
+ long long int rxq_next_cycle_store;
/* Statistics. */
@@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp,
cmap_init(&pmd->classifiers);
pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL;
- pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN;
+ pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN;
hmap_init(&pmd->poll_list);
hmap_init(&pmd->tx_ports);
@@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
long long int now = time_msec();
- if (now > pmd->rxq_interval) {
+ if (now > pmd->rxq_next_cycle_store) {
/* Get the cycles that were used to process each queue and store. */
for (unsigned i = 0; i < poll_cnt; i++) {
@@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
}
/* Start new measuring interval */
- pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN;
+ pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN;
}
--
1.8.3.1
Are there any other comments?
On 8/30/17, 10:49 AM, "Darrell Ball" <dball@vmware.com> wrote:
Thanks Kevin
Naming is hard.
The name looks a bit more intuitive and matches closely with the description previously added.
Darrell
On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote:
rxq_interval was added before there was other #defines
and code related to rxq intervals.
Rename to rxq_next_cycles_store in order to make it more intuitive.
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
lib/dpif-netdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 071ec14..55d5656 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread {
/* End of the next time interval for which processing cycles
are stored for each polled rxq. */
- long long int rxq_interval;
+ long long int rxq_next_cycle_store;
/* Statistics. */
@@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp,
cmap_init(&pmd->classifiers);
pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL;
- pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN;
+ pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN;
hmap_init(&pmd->poll_list);
hmap_init(&pmd->tx_ports);
@@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
long long int now = time_msec();
- if (now > pmd->rxq_interval) {
+ if (now > pmd->rxq_next_cycle_store) {
/* Get the cycles that were used to process each queue and store. */
for (unsigned i = 0; i < poll_cnt; i++) {
@@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
}
/* Start new measuring interval */
- pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN;
+ pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN;
}
--
1.8.3.1
I'm fine with the new name. /Jan > -----Original Message----- > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] On Behalf Of Darrell Ball > Sent: Friday, 22 September, 2017 21:22 > To: Kevin Traynor <ktraynor@redhat.com>; dev@openvswitch.org; i.maximets@samsung.com > Subject: Re: [ovs-dev] [PATCH 1/3] dpif-netdev: Rename rxq_interval. > > Are there any other comments? > > > > On 8/30/17, 10:49 AM, "Darrell Ball" <dball@vmware.com> wrote: > > Thanks Kevin > > Naming is hard. > The name looks a bit more intuitive and matches closely with the description previously added. > > Darrell > > On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote: > > rxq_interval was added before there was other #defines > and code related to rxq intervals. > > Rename to rxq_next_cycles_store in order to make it more intuitive. > > Reported-by: Ilya Maximets <i.maximets@samsung.com> > Signed-off-by: Kevin Traynor <ktraynor@redhat.com> > --- > lib/dpif-netdev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 071ec14..55d5656 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread { > /* End of the next time interval for which processing cycles > are stored for each polled rxq. */ > - long long int rxq_interval; > + long long int rxq_next_cycle_store; > > /* Statistics. */ > @@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp, > cmap_init(&pmd->classifiers); > pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL; > - pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN; > + pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN; > hmap_init(&pmd->poll_list); > hmap_init(&pmd->tx_ports); > @@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, > long long int now = time_msec(); > > - if (now > pmd->rxq_interval) { > + if (now > pmd->rxq_next_cycle_store) { > /* Get the cycles that were used to process each queue and store. */ > for (unsigned i = 0; i < poll_cnt; i++) { > @@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, > } > /* Start new measuring interval */ > - pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN; > + pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN; > } > > -- > 1.8.3.1 > > > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Ping again. This is a simple variable rename that was requested. On 09/22/2017 08:22 PM, Darrell Ball wrote: > Are there any other comments? > > > > On 8/30/17, 10:49 AM, "Darrell Ball" <dball@vmware.com> wrote: > > Thanks Kevin > > Naming is hard. > The name looks a bit more intuitive and matches closely with the description previously added. > > Darrell > > On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote: > > rxq_interval was added before there was other #defines > and code related to rxq intervals. > > Rename to rxq_next_cycles_store in order to make it more intuitive. > > Reported-by: Ilya Maximets <i.maximets@samsung.com> > Signed-off-by: Kevin Traynor <ktraynor@redhat.com> > --- > lib/dpif-netdev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 071ec14..55d5656 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread { > /* End of the next time interval for which processing cycles > are stored for each polled rxq. */ > - long long int rxq_interval; > + long long int rxq_next_cycle_store; > > /* Statistics. */ > @@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp, > cmap_init(&pmd->classifiers); > pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL; > - pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN; > + pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN; > hmap_init(&pmd->poll_list); > hmap_init(&pmd->tx_ports); > @@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, > long long int now = time_msec(); > > - if (now > pmd->rxq_interval) { > + if (now > pmd->rxq_next_cycle_store) { > /* Get the cycles that were used to process each queue and store. */ > for (unsigned i = 0; i < poll_cnt; i++) { > @@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, > } > /* Start new measuring interval */ > - pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN; > + pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN; > } > > -- > 1.8.3.1 > > > > >
LGTM, makes the code more readable. Acked-by: Antonio Fischetti <antonio.fischetti@intel.com> > -----Original Message----- > From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-bounces@openvswitch.org] > On Behalf Of Kevin Traynor > Sent: Friday, October 20, 2017 11:37 AM > To: Darrell Ball <dball@vmware.com>; dev@openvswitch.org; > i.maximets@samsung.com; Stokes, Ian <ian.stokes@intel.com> > Subject: Re: [ovs-dev] [PATCH 1/3] dpif-netdev: Rename rxq_interval. > > Ping again. This is a simple variable rename that was requested. > > On 09/22/2017 08:22 PM, Darrell Ball wrote: > > Are there any other comments? > > > > > > > > On 8/30/17, 10:49 AM, "Darrell Ball" <dball@vmware.com> wrote: > > > > Thanks Kevin > > > > Naming is hard. > > The name looks a bit more intuitive and matches closely with the > description previously added. > > > > Darrell > > > > On 8/30/17, 10:45 AM, "Kevin Traynor" <ktraynor@redhat.com> wrote: > > > > rxq_interval was added before there was other #defines > > and code related to rxq intervals. > > > > Rename to rxq_next_cycles_store in order to make it more intuitive. > > > > Reported-by: Ilya Maximets <i.maximets@samsung.com> > > Signed-off-by: Kevin Traynor <ktraynor@redhat.com> > > --- > > lib/dpif-netdev.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > > index 071ec14..55d5656 100644 > > --- a/lib/dpif-netdev.c > > +++ b/lib/dpif-netdev.c > > @@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread { > > /* End of the next time interval for which processing cycles > > are stored for each polled rxq. */ > > - long long int rxq_interval; > > + long long int rxq_next_cycle_store; > > > > /* Statistics. */ > > @@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct > dp_netdev_pmd_thread *pmd, struct dp_netdev *dp, > > cmap_init(&pmd->classifiers); > > pmd->next_optimization = time_msec() + > DPCLS_OPTIMIZATION_INTERVAL; > > - pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN; > > + pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN; > > hmap_init(&pmd->poll_list); > > hmap_init(&pmd->tx_ports); > > @@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct > dp_netdev_pmd_thread *pmd, > > long long int now = time_msec(); > > > > - if (now > pmd->rxq_interval) { > > + if (now > pmd->rxq_next_cycle_store) { > > /* Get the cycles that were used to process each queue and > store. */ > > for (unsigned i = 0; i < poll_cnt; i++) { > > @@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct > dp_netdev_pmd_thread *pmd, > > } > > /* Start new measuring interval */ > > - pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN; > > + pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN; > > } > > > > -- > > 1.8.3.1 > > > > > > > > > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 071ec14..55d5656 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -576,5 +576,5 @@ struct dp_netdev_pmd_thread { /* End of the next time interval for which processing cycles are stored for each polled rxq. */ - long long int rxq_interval; + long long int rxq_next_cycle_store; /* Statistics. */ @@ -4507,5 +4507,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp, cmap_init(&pmd->classifiers); pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL; - pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN; + pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN; hmap_init(&pmd->poll_list); hmap_init(&pmd->tx_ports); @@ -5951,5 +5951,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, long long int now = time_msec(); - if (now > pmd->rxq_interval) { + if (now > pmd->rxq_next_cycle_store) { /* Get the cycles that were used to process each queue and store. */ for (unsigned i = 0; i < poll_cnt; i++) { @@ -5961,5 +5961,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, } /* Start new measuring interval */ - pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN; + pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN; }
rxq_interval was added before there was other #defines and code related to rxq intervals. Rename to rxq_next_cycles_store in order to make it more intuitive. Reported-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> --- lib/dpif-netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)