Message ID | 1406281207-14534-1-git-send-email-santosh.shukla@linaro.org |
---|---|
State | Accepted |
Commit | c65dd407e33d6be2e9c0bf5cf5cea1200c1d5c81 |
Headers | show |
Maxim, Pl. ignore double signed-off, some problem with my local machine .gitconfig setting , else I'll send better header correct patch. Thanks. On 25 July 2014 15:10, Santosh Shukla <santosh.shukla@linaro.org> wrote: > This commit (9b8a4bb) introduced timeout_hdr api to > get the tick from tmo_buf. Lack of > this conversion in odp_timer_cancel_tmo() lead to fail > any tmo search in ticklist. It impacted odp_timer.c > api_test. > > ./odp_timer google.com > > odp_timer_ping.c:106:listen_to_pingack(): cancel_tmo failed ..exiting listner > > Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> > Signed-off-by: santosh shukla <santosh.shukla@linaro.org> > --- > platform/linux-generic/odp_timer.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c > index 612e80f..73a690b 100644 > --- a/platform/linux-generic/odp_timer.c > +++ b/platform/linux-generic/odp_timer.c > @@ -110,13 +110,16 @@ int odp_timer_cancel_tmo(odp_timer_t timer, odp_timer_tmo_t tmo) > int id; > uint64_t tick_idx; > timeout_t *cancel_tmo; > + odp_timeout_hdr_t *tmo_hdr; > tick_t *tick; > > /* get id */ > id = timer - 1; > > + tmo_hdr = odp_timeout_hdr((odp_timeout_t) tmo); > /* get tmo_buf to cancel */ > - cancel_tmo = (timeout_t *)odp_buffer_addr(tmo); > + cancel_tmo = &tmo_hdr->meta; > + > tick_idx = cancel_tmo->tick; > tick = &odp_timer.timer[id].tick[tick_idx]; > > -- > 1.7.9.5 >
Sorry I am missing one more crucial credit if you could add while merging.. Thanks [ Reported-by : Ankit Jindal <ankit.jindal@linaro.org> ] I will take care of those in future timer app improvement patches. On 25 July 2014 15:13, Santosh Shukla <santosh.shukla@linaro.org> wrote: > Maxim, > > Pl. ignore double signed-off, some problem with my local machine > .gitconfig setting , else I'll send better header correct patch. > > Thanks. > > > > On 25 July 2014 15:10, Santosh Shukla <santosh.shukla@linaro.org> wrote: >> This commit (9b8a4bb) introduced timeout_hdr api to >> get the tick from tmo_buf. Lack of >> this conversion in odp_timer_cancel_tmo() lead to fail >> any tmo search in ticklist. It impacted odp_timer.c >> api_test. >> >> ./odp_timer google.com >> >> odp_timer_ping.c:106:listen_to_pingack(): cancel_tmo failed ..exiting listner >> >> Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> >> Signed-off-by: santosh shukla <santosh.shukla@linaro.org> >> --- >> platform/linux-generic/odp_timer.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c >> index 612e80f..73a690b 100644 >> --- a/platform/linux-generic/odp_timer.c >> +++ b/platform/linux-generic/odp_timer.c >> @@ -110,13 +110,16 @@ int odp_timer_cancel_tmo(odp_timer_t timer, odp_timer_tmo_t tmo) >> int id; >> uint64_t tick_idx; >> timeout_t *cancel_tmo; >> + odp_timeout_hdr_t *tmo_hdr; >> tick_t *tick; >> >> /* get id */ >> id = timer - 1; >> >> + tmo_hdr = odp_timeout_hdr((odp_timeout_t) tmo); >> /* get tmo_buf to cancel */ >> - cancel_tmo = (timeout_t *)odp_buffer_addr(tmo); >> + cancel_tmo = &tmo_hdr->meta; >> + >> tick_idx = cancel_tmo->tick; >> tick = &odp_timer.timer[id].tick[tick_idx]; >> >> -- >> 1.7.9.5 >>
Merged, Thanks! Maxim. On 07/25/2014 01:40 PM, Santosh Shukla wrote: > This commit (9b8a4bb) introduced timeout_hdr api to > get the tick from tmo_buf. Lack of > this conversion in odp_timer_cancel_tmo() lead to fail > any tmo search in ticklist. It impacted odp_timer.c > api_test. > > ./odp_timer google.com > > odp_timer_ping.c:106:listen_to_pingack(): cancel_tmo failed ..exiting listner > > Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> > Signed-off-by: santosh shukla <santosh.shukla@linaro.org> > --- > platform/linux-generic/odp_timer.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c > index 612e80f..73a690b 100644 > --- a/platform/linux-generic/odp_timer.c > +++ b/platform/linux-generic/odp_timer.c > @@ -110,13 +110,16 @@ int odp_timer_cancel_tmo(odp_timer_t timer, odp_timer_tmo_t tmo) > int id; > uint64_t tick_idx; > timeout_t *cancel_tmo; > + odp_timeout_hdr_t *tmo_hdr; > tick_t *tick; > > /* get id */ > id = timer - 1; > > + tmo_hdr = odp_timeout_hdr((odp_timeout_t) tmo); > /* get tmo_buf to cancel */ > - cancel_tmo = (timeout_t *)odp_buffer_addr(tmo); > + cancel_tmo = &tmo_hdr->meta; > + > tick_idx = cancel_tmo->tick; > tick = &odp_timer.timer[id].tick[tick_idx]; >
diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c index 612e80f..73a690b 100644 --- a/platform/linux-generic/odp_timer.c +++ b/platform/linux-generic/odp_timer.c @@ -110,13 +110,16 @@ int odp_timer_cancel_tmo(odp_timer_t timer, odp_timer_tmo_t tmo) int id; uint64_t tick_idx; timeout_t *cancel_tmo; + odp_timeout_hdr_t *tmo_hdr; tick_t *tick; /* get id */ id = timer - 1; + tmo_hdr = odp_timeout_hdr((odp_timeout_t) tmo); /* get tmo_buf to cancel */ - cancel_tmo = (timeout_t *)odp_buffer_addr(tmo); + cancel_tmo = &tmo_hdr->meta; + tick_idx = cancel_tmo->tick; tick = &odp_timer.timer[id].tick[tick_idx];