diff mbox

helper: remove unused odph_linux_process_fork API

Message ID 1462189635-547-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes May 2, 2016, 11:47 a.m. UTC
odph_linux_process_fork is not used by any ODP example or test, it is also
untested by the helper test suite.

odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so
just delete this, the impact if there are any users is very small.

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 helper/include/odp/helper/linux.h | 18 ------------------
 helper/linux.c                    | 10 ----------
 2 files changed, 28 deletions(-)

Comments

Balakrishna Garapati May 2, 2016, 12:01 p.m. UTC | #1
On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

> odph_linux_process_fork is not used by any ODP example or test, it is also

> untested by the helper test suite.

>

Just for the note, we use this api currently in our nginx_ofp app.

>

> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

> just delete this, the impact if there are any users is very small.

>

 Agree, need a minor update in the app.

/Krishna

>

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> ---

>  helper/include/odp/helper/linux.h | 18 ------------------

>  helper/linux.c                    | 10 ----------

>  2 files changed, 28 deletions(-)

>

> diff --git a/helper/include/odp/helper/linux.h

> b/helper/include/odp/helper/linux.h

> index 7a6504f..a68f269 100644

> --- a/helper/include/odp/helper/linux.h

> +++ b/helper/include/odp/helper/linux.h

> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

> *pthread_tbl,

>   */

>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);

>

> -

> -/**

> - * Fork a process

> - *

> - * Forks and sets CPU affinity for the child process. Ignores 'start' and

> 'arg'

> - * thread parameters.

> - *

> - * @param[out] proc        Pointer to process state info (for output)

> - * @param      cpu         Destination CPU for the child process

> - * @param      thr_params  Linux helper thread parameters

> - *

> - * @return On success: 1 for the parent, 0 for the child

> - *         On failure: -1 for the parent, -2 for the child

> - */

> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

> -                           const odph_linux_thr_params_t *thr_params);

> -

> -

>  /**

>   * Fork a number of processes

>   *

> diff --git a/helper/linux.c b/helper/linux.c

> index 24e243b..a181322 100644

> --- a/helper/linux.c

> +++ b/helper/linux.c

> @@ -183,16 +183,6 @@ int odph_linux_process_fork_n(odph_linux_process_t

> *proc_tbl,

>         return 1;

>  }

>

> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

> -                           const odph_linux_thr_params_t *thr_params)

> -{

> -       odp_cpumask_t mask;

> -

> -       odp_cpumask_zero(&mask);

> -       odp_cpumask_set(&mask, cpu);

> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

> -}

> -

>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

>  {

>         pid_t pid;

> --

> 2.7.4

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Christophe Milard May 3, 2016, 11:32 a.m. UTC | #2
Please don't do that: It will just create an extra rebase on my "running
things in process mode " patch series which replaces all this (and
therefore delete these also)

Christophe.

On 2 May 2016 at 14:01, Krishna Garapati <balakrishna.garapati@linaro.org>
wrote:

>

>

> On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>> odph_linux_process_fork is not used by any ODP example or test, it is also

>> untested by the helper test suite.

>>

> Just for the note, we use this api currently in our nginx_ofp app.

>

>>

>> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

>> just delete this, the impact if there are any users is very small.

>>

>  Agree, need a minor update in the app.

>

> /Krishna

>

>>

>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>> ---

>>  helper/include/odp/helper/linux.h | 18 ------------------

>>  helper/linux.c                    | 10 ----------

>>  2 files changed, 28 deletions(-)

>>

>> diff --git a/helper/include/odp/helper/linux.h

>> b/helper/include/odp/helper/linux.h

>> index 7a6504f..a68f269 100644

>> --- a/helper/include/odp/helper/linux.h

>> +++ b/helper/include/odp/helper/linux.h

>> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

>> *pthread_tbl,

>>   */

>>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);

>>

>> -

>> -/**

>> - * Fork a process

>> - *

>> - * Forks and sets CPU affinity for the child process. Ignores 'start'

>> and 'arg'

>> - * thread parameters.

>> - *

>> - * @param[out] proc        Pointer to process state info (for output)

>> - * @param      cpu         Destination CPU for the child process

>> - * @param      thr_params  Linux helper thread parameters

>> - *

>> - * @return On success: 1 for the parent, 0 for the child

>> - *         On failure: -1 for the parent, -2 for the child

>> - */

>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>> -                           const odph_linux_thr_params_t *thr_params);

>> -

>> -

>>  /**

>>   * Fork a number of processes

>>   *

>> diff --git a/helper/linux.c b/helper/linux.c

>> index 24e243b..a181322 100644

>> --- a/helper/linux.c

>> +++ b/helper/linux.c

>> @@ -183,16 +183,6 @@ int odph_linux_process_fork_n(odph_linux_process_t

>> *proc_tbl,

>>         return 1;

>>  }

>>

>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>> -                           const odph_linux_thr_params_t *thr_params)

>> -{

>> -       odp_cpumask_t mask;

>> -

>> -       odp_cpumask_zero(&mask);

>> -       odp_cpumask_set(&mask, cpu);

>> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

>> -}

>> -

>>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

>>  {

>>         pid_t pid;

>> --

>> 2.7.4

>>

>> _______________________________________________

>> lng-odp mailing list

>> lng-odp@lists.linaro.org

>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>

>
Mike Holmes May 3, 2016, 11:35 a.m. UTC | #3
On 3 May 2016 at 07:32, Christophe Milard <christophe.milard@linaro.org>
wrote:

> Please don't do that: It will just create an extra rebase on my "running

> things in process mode " patch series which replaces all this (and

> therefore delete these also)

>

>

We need a test in helper for it then :) we dont want the full Monarch API
to go out with an untested API from the test suite perspective, Krishna,
Christoph any chance you can add one since you both care about the API?

Mike



> Christophe.

>

> On 2 May 2016 at 14:01, Krishna Garapati <balakrishna.garapati@linaro.org>

> wrote:

>

>>

>>

>> On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

>>

>>> odph_linux_process_fork is not used by any ODP example or test, it is

>>> also

>>> untested by the helper test suite.

>>>

>> Just for the note, we use this api currently in our nginx_ofp app.

>>

>>>

>>> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

>>> just delete this, the impact if there are any users is very small.

>>>

>>  Agree, need a minor update in the app.

>>

>> /Krishna

>>

>>>

>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>>> ---

>>>  helper/include/odp/helper/linux.h | 18 ------------------

>>>  helper/linux.c                    | 10 ----------

>>>  2 files changed, 28 deletions(-)

>>>

>>> diff --git a/helper/include/odp/helper/linux.h

>>> b/helper/include/odp/helper/linux.h

>>> index 7a6504f..a68f269 100644

>>> --- a/helper/include/odp/helper/linux.h

>>> +++ b/helper/include/odp/helper/linux.h

>>> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

>>> *pthread_tbl,

>>>   */

>>>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);

>>>

>>> -

>>> -/**

>>> - * Fork a process

>>> - *

>>> - * Forks and sets CPU affinity for the child process. Ignores 'start'

>>> and 'arg'

>>> - * thread parameters.

>>> - *

>>> - * @param[out] proc        Pointer to process state info (for output)

>>> - * @param      cpu         Destination CPU for the child process

>>> - * @param      thr_params  Linux helper thread parameters

>>> - *

>>> - * @return On success: 1 for the parent, 0 for the child

>>> - *         On failure: -1 for the parent, -2 for the child

>>> - */

>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>> -                           const odph_linux_thr_params_t *thr_params);

>>> -

>>> -

>>>  /**

>>>   * Fork a number of processes

>>>   *

>>> diff --git a/helper/linux.c b/helper/linux.c

>>> index 24e243b..a181322 100644

>>> --- a/helper/linux.c

>>> +++ b/helper/linux.c

>>> @@ -183,16 +183,6 @@ int odph_linux_process_fork_n(odph_linux_process_t

>>> *proc_tbl,

>>>         return 1;

>>>  }

>>>

>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>> -                           const odph_linux_thr_params_t *thr_params)

>>> -{

>>> -       odp_cpumask_t mask;

>>> -

>>> -       odp_cpumask_zero(&mask);

>>> -       odp_cpumask_set(&mask, cpu);

>>> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

>>> -}

>>> -

>>>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

>>>  {

>>>         pid_t pid;

>>> --

>>> 2.7.4

>>>

>>> _______________________________________________

>>> lng-odp mailing list

>>> lng-odp@lists.linaro.org

>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>

>>

>>

>> _______________________________________________

>> lng-odp mailing list

>> lng-odp@lists.linaro.org

>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Christophe Milard May 3, 2016, 11:39 a.m. UTC | #4
There is a test for these new functions in the patch series. Hope this is
what you meant by "it".

Christophe

On 3 May 2016 at 13:35, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>

> On 3 May 2016 at 07:32, Christophe Milard <christophe.milard@linaro.org>

> wrote:

>

>> Please don't do that: It will just create an extra rebase on my "running

>> things in process mode " patch series which replaces all this (and

>> therefore delete these also)

>>

>>

> We need a test in helper for it then :) we dont want the full Monarch API

> to go out with an untested API from the test suite perspective, Krishna,

> Christoph any chance you can add one since you both care about the API?

>

> Mike

>

>

>

>> Christophe.

>>

>> On 2 May 2016 at 14:01, Krishna Garapati <balakrishna.garapati@linaro.org

>> > wrote:

>>

>>>

>>>

>>> On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

>>>

>>>> odph_linux_process_fork is not used by any ODP example or test, it is

>>>> also

>>>> untested by the helper test suite.

>>>>

>>> Just for the note, we use this api currently in our nginx_ofp app.

>>>

>>>>

>>>> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

>>>> just delete this, the impact if there are any users is very small.

>>>>

>>>  Agree, need a minor update in the app.

>>>

>>> /Krishna

>>>

>>>>

>>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>>>> ---

>>>>  helper/include/odp/helper/linux.h | 18 ------------------

>>>>  helper/linux.c                    | 10 ----------

>>>>  2 files changed, 28 deletions(-)

>>>>

>>>> diff --git a/helper/include/odp/helper/linux.h

>>>> b/helper/include/odp/helper/linux.h

>>>> index 7a6504f..a68f269 100644

>>>> --- a/helper/include/odp/helper/linux.h

>>>> +++ b/helper/include/odp/helper/linux.h

>>>> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

>>>> *pthread_tbl,

>>>>   */

>>>>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int

>>>> num);

>>>>

>>>> -

>>>> -/**

>>>> - * Fork a process

>>>> - *

>>>> - * Forks and sets CPU affinity for the child process. Ignores 'start'

>>>> and 'arg'

>>>> - * thread parameters.

>>>> - *

>>>> - * @param[out] proc        Pointer to process state info (for output)

>>>> - * @param      cpu         Destination CPU for the child process

>>>> - * @param      thr_params  Linux helper thread parameters

>>>> - *

>>>> - * @return On success: 1 for the parent, 0 for the child

>>>> - *         On failure: -1 for the parent, -2 for the child

>>>> - */

>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>> -                           const odph_linux_thr_params_t *thr_params);

>>>> -

>>>> -

>>>>  /**

>>>>   * Fork a number of processes

>>>>   *

>>>> diff --git a/helper/linux.c b/helper/linux.c

>>>> index 24e243b..a181322 100644

>>>> --- a/helper/linux.c

>>>> +++ b/helper/linux.c

>>>> @@ -183,16 +183,6 @@ int odph_linux_process_fork_n(odph_linux_process_t

>>>> *proc_tbl,

>>>>         return 1;

>>>>  }

>>>>

>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>> -                           const odph_linux_thr_params_t *thr_params)

>>>> -{

>>>> -       odp_cpumask_t mask;

>>>> -

>>>> -       odp_cpumask_zero(&mask);

>>>> -       odp_cpumask_set(&mask, cpu);

>>>> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

>>>> -}

>>>> -

>>>>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

>>>>  {

>>>>         pid_t pid;

>>>> --

>>>> 2.7.4

>>>>

>>>> _______________________________________________

>>>> lng-odp mailing list

>>>> lng-odp@lists.linaro.org

>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>

>>>

>>>

>>> _______________________________________________

>>> lng-odp mailing list

>>> lng-odp@lists.linaro.org

>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>

>>>

>>

>

>

> --

> Mike Holmes

> Technical Manager - Linaro Networking Group

> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs

> "Work should be fun and collaborative, the rest follows"

>

>

>
Mike Holmes May 3, 2016, 12:27 p.m. UTC | #5
On 3 May 2016 at 07:39, Christophe Milard <christophe.milard@linaro.org>
wrote:

> There is a test for these new functions in the patch series. Hope this is

> what you meant by "it".

>


OK - if you will be adding a test that is perfect :), I am just going on
the current state
http://docs.opendataplane.org/snapshots/master/linux-generic-helper-lcov-html/helper/linux.c.func-sort-c.html


>

> Christophe

>

> On 3 May 2016 at 13:35, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>>

>>

>> On 3 May 2016 at 07:32, Christophe Milard <christophe.milard@linaro.org>

>> wrote:

>>

>>> Please don't do that: It will just create an extra rebase on my "running

>>> things in process mode " patch series which replaces all this (and

>>> therefore delete these also)

>>>

>>>

>> We need a test in helper for it then :) we dont want the full Monarch API

>> to go out with an untested API from the test suite perspective, Krishna,

>> Christoph any chance you can add one since you both care about the API?

>>

>> Mike

>>

>>

>>

>>> Christophe.

>>>

>>> On 2 May 2016 at 14:01, Krishna Garapati <

>>> balakrishna.garapati@linaro.org> wrote:

>>>

>>>>

>>>>

>>>> On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

>>>>

>>>>> odph_linux_process_fork is not used by any ODP example or test, it is

>>>>> also

>>>>> untested by the helper test suite.

>>>>>

>>>> Just for the note, we use this api currently in our nginx_ofp app.

>>>>

>>>>>

>>>>> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

>>>>> just delete this, the impact if there are any users is very small.

>>>>>

>>>>  Agree, need a minor update in the app.

>>>>

>>>> /Krishna

>>>>

>>>>>

>>>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>>>>> ---

>>>>>  helper/include/odp/helper/linux.h | 18 ------------------

>>>>>  helper/linux.c                    | 10 ----------

>>>>>  2 files changed, 28 deletions(-)

>>>>>

>>>>> diff --git a/helper/include/odp/helper/linux.h

>>>>> b/helper/include/odp/helper/linux.h

>>>>> index 7a6504f..a68f269 100644

>>>>> --- a/helper/include/odp/helper/linux.h

>>>>> +++ b/helper/include/odp/helper/linux.h

>>>>> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

>>>>> *pthread_tbl,

>>>>>   */

>>>>>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int

>>>>> num);

>>>>>

>>>>> -

>>>>> -/**

>>>>> - * Fork a process

>>>>> - *

>>>>> - * Forks and sets CPU affinity for the child process. Ignores 'start'

>>>>> and 'arg'

>>>>> - * thread parameters.

>>>>> - *

>>>>> - * @param[out] proc        Pointer to process state info (for output)

>>>>> - * @param      cpu         Destination CPU for the child process

>>>>> - * @param      thr_params  Linux helper thread parameters

>>>>> - *

>>>>> - * @return On success: 1 for the parent, 0 for the child

>>>>> - *         On failure: -1 for the parent, -2 for the child

>>>>> - */

>>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>>> -                           const odph_linux_thr_params_t *thr_params);

>>>>> -

>>>>> -

>>>>>  /**

>>>>>   * Fork a number of processes

>>>>>   *

>>>>> diff --git a/helper/linux.c b/helper/linux.c

>>>>> index 24e243b..a181322 100644

>>>>> --- a/helper/linux.c

>>>>> +++ b/helper/linux.c

>>>>> @@ -183,16 +183,6 @@ int

>>>>> odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,

>>>>>         return 1;

>>>>>  }

>>>>>

>>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>>> -                           const odph_linux_thr_params_t *thr_params)

>>>>> -{

>>>>> -       odp_cpumask_t mask;

>>>>> -

>>>>> -       odp_cpumask_zero(&mask);

>>>>> -       odp_cpumask_set(&mask, cpu);

>>>>> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

>>>>> -}

>>>>> -

>>>>>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

>>>>>  {

>>>>>         pid_t pid;

>>>>> --

>>>>> 2.7.4

>>>>>

>>>>> _______________________________________________

>>>>> lng-odp mailing list

>>>>> lng-odp@lists.linaro.org

>>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>>

>>>>

>>>>

>>>> _______________________________________________

>>>> lng-odp mailing list

>>>> lng-odp@lists.linaro.org

>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>

>>>>

>>>

>>

>>

>> --

>> Mike Holmes

>> Technical Manager - Linaro Networking Group

>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs

>> "Work should be fun and collaborative, the rest follows"

>>

>>

>>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Christophe Milard May 9, 2016, 6:21 a.m. UTC | #6
I am not sure I really agree with that, Petri:
as of today, none of the written validation tests, performance tests nor
example needed to do the difference: of course, that does not mean it will
never be needed, but I don't think we should be adding (nor keeping) unused
code promoting a behaviour we do not wish: If we want to be odpthread type
agnostic as much as possible should we really provide means to go the other
way in helpers?.
And if one piece of code does need to do the difference in the future,
shouldn't that specific code call pthread/fork directely then? should the
helper provide a wrapper for this specific case, really?

Christophe

On 6 May 2016 at 11:09, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia.com> wrote:

> Direct pthreads and process helpers should not be removed. Although our

> validation tests and examples need to be thread type agnostic, there are a

> bunch of other applications that will want to use either Linux pthread or

> process (not opaque threads).

>

> Tests should be added for direct pthread/process helpers, instead of

> removing those.

>

> -Petri

>

> > -----Original Message-----

> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> Mike

> > Holmes

> > Sent: Monday, May 02, 2016 2:47 PM

> > To: lng-odp@lists.linaro.org

> > Subject: [lng-odp] [PATCH] helper: remove unused odph_linux_process_fork

> > API

> >

> > odph_linux_process_fork is not used by any ODP example or test, it is

> also

> > untested by the helper test suite.

> >

> > odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

> > just delete this, the impact if there are any users is very small.

> >

> > Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> > ---

> >  helper/include/odp/helper/linux.h | 18 ------------------

> >  helper/linux.c                    | 10 ----------

> >  2 files changed, 28 deletions(-)

> >

> > diff --git a/helper/include/odp/helper/linux.h

> > b/helper/include/odp/helper/linux.h

> > index 7a6504f..a68f269 100644

> > --- a/helper/include/odp/helper/linux.h

> > +++ b/helper/include/odp/helper/linux.h

> > @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

> > *pthread_tbl,

> >   */

> >  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);

> >

> > -

> > -/**

> > - * Fork a process

> > - *

> > - * Forks and sets CPU affinity for the child process. Ignores 'start'

> and

> > 'arg'

> > - * thread parameters.

> > - *

> > - * @param[out] proc        Pointer to process state info (for output)

> > - * @param      cpu         Destination CPU for the child process

> > - * @param      thr_params  Linux helper thread parameters

> > - *

> > - * @return On success: 1 for the parent, 0 for the child

> > - *         On failure: -1 for the parent, -2 for the child

> > - */

> > -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

> > -                         const odph_linux_thr_params_t *thr_params);

> > -

> > -

> >  /**

> >   * Fork a number of processes

> >   *

> > diff --git a/helper/linux.c b/helper/linux.c

> > index 24e243b..a181322 100644

> > --- a/helper/linux.c

> > +++ b/helper/linux.c

> > @@ -183,16 +183,6 @@ int odph_linux_process_fork_n(odph_linux_process_t

> > *proc_tbl,

> >       return 1;

> >  }

> >

> > -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

> > -                         const odph_linux_thr_params_t *thr_params)

> > -{

> > -     odp_cpumask_t mask;

> > -

> > -     odp_cpumask_zero(&mask);

> > -     odp_cpumask_set(&mask, cpu);

> > -     return odph_linux_process_fork_n(proc, &mask, thr_params);

> > -}

> > -

> >  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)

> >  {

> >       pid_t pid;

> > --

> > 2.7.4

> >

> > _______________________________________________

> > lng-odp mailing list

> > lng-odp@lists.linaro.org

> > https://lists.linaro.org/mailman/listinfo/lng-odp

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Christophe Milard May 9, 2016, 6:27 a.m. UTC | #7
The test exists already in the "running things in process mode" patch
series (reviewed by Brian). Hopefully I do test what I wrote there. However
his patch series does not add any test for the fork*() helper  functions as
these functions are removed in the last patch of the series.
I still think these should be removed (see separate answer to Petri).

Christophe.

On 3 May 2016 at 14:27, Mike Holmes <mike.holmes@linaro.org> wrote:

>

>

> On 3 May 2016 at 07:39, Christophe Milard <christophe.milard@linaro.org>

> wrote:

>

>> There is a test for these new functions in the patch series. Hope this is

>> what you meant by "it".

>>

>

> OK - if you will be adding a test that is perfect :), I am just going on

> the current state

> http://docs.opendataplane.org/snapshots/master/linux-generic-helper-lcov-html/helper/linux.c.func-sort-c.html

>

>

>>

>> Christophe

>>

>> On 3 May 2016 at 13:35, Mike Holmes <mike.holmes@linaro.org> wrote:

>>

>>>

>>>

>>> On 3 May 2016 at 07:32, Christophe Milard <christophe.milard@linaro.org>

>>> wrote:

>>>

>>>> Please don't do that: It will just create an extra rebase on my

>>>> "running things in process mode " patch series which replaces all this (and

>>>> therefore delete these also)

>>>>

>>>>

>>> We need a test in helper for it then :) we dont want the full Monarch

>>> API to go out with an untested API from the test suite perspective,

>>> Krishna, Christoph any chance you can add one since you both care about the

>>> API?

>>>

>>> Mike

>>>

>>>

>>>

>>>> Christophe.

>>>>

>>>> On 2 May 2016 at 14:01, Krishna Garapati <

>>>> balakrishna.garapati@linaro.org> wrote:

>>>>

>>>>>

>>>>>

>>>>> On 2 May 2016 at 13:47, Mike Holmes <mike.holmes@linaro.org> wrote:

>>>>>

>>>>>> odph_linux_process_fork is not used by any ODP example or test, it is

>>>>>> also

>>>>>> untested by the helper test suite.

>>>>>>

>>>>> Just for the note, we use this api currently in our nginx_ofp app.

>>>>>

>>>>>>

>>>>>> odph_linux_process_fork is a wrapper for odph_linux_process_fork_n so

>>>>>> just delete this, the impact if there are any users is very small.

>>>>>>

>>>>>  Agree, need a minor update in the app.

>>>>>

>>>>> /Krishna

>>>>>

>>>>>>

>>>>>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

>>>>>> ---

>>>>>>  helper/include/odp/helper/linux.h | 18 ------------------

>>>>>>  helper/linux.c                    | 10 ----------

>>>>>>  2 files changed, 28 deletions(-)

>>>>>>

>>>>>> diff --git a/helper/include/odp/helper/linux.h

>>>>>> b/helper/include/odp/helper/linux.h

>>>>>> index 7a6504f..a68f269 100644

>>>>>> --- a/helper/include/odp/helper/linux.h

>>>>>> +++ b/helper/include/odp/helper/linux.h

>>>>>> @@ -80,24 +80,6 @@ int odph_linux_pthread_create(odph_linux_pthread_t

>>>>>> *pthread_tbl,

>>>>>>   */

>>>>>>  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int

>>>>>> num);

>>>>>>

>>>>>> -

>>>>>> -/**

>>>>>> - * Fork a process

>>>>>> - *

>>>>>> - * Forks and sets CPU affinity for the child process. Ignores

>>>>>> 'start' and 'arg'

>>>>>> - * thread parameters.

>>>>>> - *

>>>>>> - * @param[out] proc        Pointer to process state info (for output)

>>>>>> - * @param      cpu         Destination CPU for the child process

>>>>>> - * @param      thr_params  Linux helper thread parameters

>>>>>> - *

>>>>>> - * @return On success: 1 for the parent, 0 for the child

>>>>>> - *         On failure: -1 for the parent, -2 for the child

>>>>>> - */

>>>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>>>> -                           const odph_linux_thr_params_t

>>>>>> *thr_params);

>>>>>> -

>>>>>> -

>>>>>>  /**

>>>>>>   * Fork a number of processes

>>>>>>   *

>>>>>> diff --git a/helper/linux.c b/helper/linux.c

>>>>>> index 24e243b..a181322 100644

>>>>>> --- a/helper/linux.c

>>>>>> +++ b/helper/linux.c

>>>>>> @@ -183,16 +183,6 @@ int

>>>>>> odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,

>>>>>>         return 1;

>>>>>>  }

>>>>>>

>>>>>> -int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,

>>>>>> -                           const odph_linux_thr_params_t *thr_params)

>>>>>> -{

>>>>>> -       odp_cpumask_t mask;

>>>>>> -

>>>>>> -       odp_cpumask_zero(&mask);

>>>>>> -       odp_cpumask_set(&mask, cpu);

>>>>>> -       return odph_linux_process_fork_n(proc, &mask, thr_params);

>>>>>> -}

>>>>>> -

>>>>>>  int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int

>>>>>> num)

>>>>>>  {

>>>>>>         pid_t pid;

>>>>>> --

>>>>>> 2.7.4

>>>>>>

>>>>>> _______________________________________________

>>>>>> lng-odp mailing list

>>>>>> lng-odp@lists.linaro.org

>>>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>>>

>>>>>

>>>>>

>>>>> _______________________________________________

>>>>> lng-odp mailing list

>>>>> lng-odp@lists.linaro.org

>>>>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>>>>

>>>>>

>>>>

>>>

>>>

>>> --

>>> Mike Holmes

>>> Technical Manager - Linaro Networking Group

>>> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM

>>> SoCs

>>> "Work should be fun and collaborative, the rest follows"

>>>

>>>

>>>

>>

>

>

> --

> Mike Holmes

> Technical Manager - Linaro Networking Group

> Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs

> "Work should be fun and collaborative, the rest follows"

>

>

>
diff mbox

Patch

diff --git a/helper/include/odp/helper/linux.h b/helper/include/odp/helper/linux.h
index 7a6504f..a68f269 100644
--- a/helper/include/odp/helper/linux.h
+++ b/helper/include/odp/helper/linux.h
@@ -80,24 +80,6 @@  int odph_linux_pthread_create(odph_linux_pthread_t *pthread_tbl,
  */
 void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num);
 
-
-/**
- * Fork a process
- *
- * Forks and sets CPU affinity for the child process. Ignores 'start' and 'arg'
- * thread parameters.
- *
- * @param[out] proc        Pointer to process state info (for output)
- * @param      cpu         Destination CPU for the child process
- * @param      thr_params  Linux helper thread parameters
- *
- * @return On success: 1 for the parent, 0 for the child
- *         On failure: -1 for the parent, -2 for the child
- */
-int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,
-			    const odph_linux_thr_params_t *thr_params);
-
-
 /**
  * Fork a number of processes
  *
diff --git a/helper/linux.c b/helper/linux.c
index 24e243b..a181322 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -183,16 +183,6 @@  int odph_linux_process_fork_n(odph_linux_process_t *proc_tbl,
 	return 1;
 }
 
-int odph_linux_process_fork(odph_linux_process_t *proc, int cpu,
-			    const odph_linux_thr_params_t *thr_params)
-{
-	odp_cpumask_t mask;
-
-	odp_cpumask_zero(&mask);
-	odp_cpumask_set(&mask, cpu);
-	return odph_linux_process_fork_n(proc, &mask, thr_params);
-}
-
 int odph_linux_process_wait_n(odph_linux_process_t *proc_tbl, int num)
 {
 	pid_t pid;