p4lang / switch

Consolidated switch repo (API, SAI and Nettlink)
151 stars 72 forks source link

Fix a race between threads #81

Closed sreedhaa closed 7 years ago

sreedhaa commented 7 years ago

Make sure all resource allocations are completed by switch_packet_driver_thread before exiting the parent.

From OpenSwitch context, this was resulting in occasional crashes inside switch_api_hostif_create() when returning parent triggred other operations related CPU interface, which was still being worked upon by switch_packet_driver_thread.

Signed-off-by: Aniketa aniketa.kod.sreedhar@hpe.com