On Thu, Feb 25, 2021 at 9:33 PM Anton Ivanov <anton.iva...@cambridgegreys.com> wrote: > > Good one. > > I will add handling for that. > > I think we can just restart the call if it is it an EINTR.
The patches need rebase. Can you please rebase to the latest master and post them after addressing the review comments from me and Ilya. I will try to run it on my other machine. Thanks Numan > > A. > > On 25/02/2021 15:18, Ilya Maximets wrote: > > On 2/12/21 3:49 PM, Anton Ivanov wrote: > >> This adds a set of functions and macros intended to process > >> hashes in parallel. > >> > >> The principles of operation are documented in the fasthmap.h > >> > >> If these one day go into the OVS tree, the OVS tree versions > >> would be used in preference. > >> > >> Signed-off-by: Anton Ivanov <anton.iva...@cambridgegreys.com> > > Hi, Anton. Not a full review, just one comment below. > > > >> +static inline void wait_for_work(struct worker_control *control) > >> +{ > >> + sem_wait(control->fire); > >> +} > > Shouldn't we check the result of sem_wait? If it failed with > > EINTR we likely need to call it again, otherwise worker thread > > might start working on the incomplete or uninitialized data > > and crash. > > > > We may also add assertion for EINVAL just to catch it earlier. > > > > Best regards, Ilya Maximets. > > > -- > Anton R. Ivanov > Cambridgegreys Limited. Registered in England. Company Number 10273661 > https://www.cambridgegreys.com/ > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev