Re: [devel] [PATCH 00 of 15] Review Request for osaf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

2013-11-21 Thread Ramesh Betham
Hi Anders,

Here are my review comments. Not tested.

 1. In osaf_ppoll(), until ppoll() is in real use.. can we keep the
logics simple to poll()  for now don't use osaf_ppoll() and let
the osaf_poll() take care calling poll() etc.
 2. In osaf_ppoll(), for result = poll(), need to handle the case where
revents set to POLLNVAL.
 3. Where ever pollfd struct is set/initialized with fd and POLLIN, also
please set revents=0;.
 4. In nbconnect() of contrib/plmc/plmcd/plmcd.c: wset.events =
POLLOUT;  should be wset.events = POLLIN;

This patch enforces to test OpenSAF thoroughly to handle all possible 
cases of poll() usage.

Thanks,
Ramesh.


On 10/31/2013 6:54 PM, Anders Widell wrote:
> Summary: osaf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
> Review request for Trac Ticket(s): 452
> Peer Reviewer(s): Mathi, Ramesh
> Pull request to:
> Affected branch(es): default(4.4)
> Development branch: default
>
> 
> Impacted area   Impact y/n
> 
>   Docsn
>   Build systemn
>   RPM/packaging   n
>   Configuration files n
>   Startup scripts n
>   SAF servicesy
>   OpenSAF servicesy
>   Core libraries  y
>   Samples n
>   Tests   y
>   Other   n
>
>
> Comments (indicate scope for each "y" above):
> -
> This set of patches replace usages of select() with the new osaf_poll() API
> introduced in ticket [#580]. Stricly speaking, not all of them have to be
> replaced in order to solve the problem described in ticket [#452], but to
> ensure that no select() that should have been replaced is forgotten, we
> replace all occurrences of select(). This way, it is easy to check that
> select() is not used, e.g. by running the grep command on the source tree.
>
> Note that the java bindings have not yet been fixed. They will be fixed in
> a patch that will be sent out later.
>
> changeset 8bd7a81783f17268607be9ad703bc7978e1df7ff
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   amf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
> changeset 7a3af5d1b0464b7cb2b2c1b749f6e0a8530f8f34
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   base: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
>   The following APIs were based on select() and have been removed from 
> BASE:
>
>   m_SET_FD_IN_SEL_OBJ() m_GET_HIGHER_SEL_OBJ() ncs_sel_obj_select()
>   m_NCS_SEL_OBJ_SELECT() ncs_sel_obj_poll_single_obj()
>   m_NCS_SEL_OBJ_POLL_SINGLE_OBJ() m_NCS_SEL_OBJ_ZERO() m_NCS_SEL_OBJ_SET()
>   m_NCS_SEL_OBJ_ISSET() m_NCS_SEL_OBJ_CLR() NCS_SEL_OBJ_SET
>
> changeset 7738c5ed214580b07dabf9519e87b3e78b8f9745
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   ckpt: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
> changeset 68977bc498106e797d31c530e944641741911ac8
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   clm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
> changeset 6fdf5ea8d207c1ca7e26952fa4432504c305a244
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   dtm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
> changeset fecc4ff2bab5c0fc232dd93b1d80c15014423719
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   evt: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of select() with poll().
>
> changeset 74935cb76deeba539d1dc4b0f9136014b1f5bf94
> Author:   Anders Widell 
> Date: Thu, 31 Oct 2013 14:13:50 +0100
>
>   imm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
>
>   The select() function cannot handle file descriptors larger than 1023. 
> To
>   avoid this limitation, we replace all usages of

[devel] [PATCH 00 of 15] Review Request for osaf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

2013-10-31 Thread Anders Widell
Summary: osaf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]
Review request for Trac Ticket(s): 452
Peer Reviewer(s): Mathi, Ramesh
Pull request to:
Affected branch(es): default(4.4)
Development branch: default


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesy
 OpenSAF servicesy
 Core libraries  y
 Samples n
 Tests   y
 Other   n


Comments (indicate scope for each "y" above):
-
This set of patches replace usages of select() with the new osaf_poll() API
introduced in ticket [#580]. Stricly speaking, not all of them have to be
replaced in order to solve the problem described in ticket [#452], but to
ensure that no select() that should have been replaced is forgotten, we
replace all occurrences of select(). This way, it is easy to check that
select() is not used, e.g. by running the grep command on the source tree.

Note that the java bindings have not yet been fixed. They will be fixed in
a patch that will be sent out later.

changeset 8bd7a81783f17268607be9ad703bc7978e1df7ff
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

amf: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 7a3af5d1b0464b7cb2b2c1b749f6e0a8530f8f34
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

base: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

The following APIs were based on select() and have been removed from 
BASE:

m_SET_FD_IN_SEL_OBJ() m_GET_HIGHER_SEL_OBJ() ncs_sel_obj_select()
m_NCS_SEL_OBJ_SELECT() ncs_sel_obj_poll_single_obj()
m_NCS_SEL_OBJ_POLL_SINGLE_OBJ() m_NCS_SEL_OBJ_ZERO() m_NCS_SEL_OBJ_SET()
m_NCS_SEL_OBJ_ISSET() m_NCS_SEL_OBJ_CLR() NCS_SEL_OBJ_SET

changeset 7738c5ed214580b07dabf9519e87b3e78b8f9745
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

ckpt: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 68977bc498106e797d31c530e944641741911ac8
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

clm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 6fdf5ea8d207c1ca7e26952fa4432504c305a244
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

dtm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset fecc4ff2bab5c0fc232dd93b1d80c15014423719
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

evt: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 74935cb76deeba539d1dc4b0f9136014b1f5bf94
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

imm: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 28b843a756325cc0f04de0015fc4e30887e8b2dc
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

lck: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset e90ead796c0c3ea134c764c188cafcecc925a07f
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

log: Replace select() with osaf_poll() to avoid 1024 fd limit [#452]

The select() function cannot handle file descriptors larger than 1023. 
To
avoid this limitation, we replace all usages of select() with poll().

changeset 0159610ba8d939cc6917a0dc0d693a524ead5538
Author: Anders Widell 
Date:   Thu, 31 Oct 2013 14:13:50 +0100

mds: Replace select() with osaf_poll