Thx, applied to master,
On Wed, Nov 26, 2014 at 2:51 PM, Jarno Rajahalme
wrote:
>
> On Nov 26, 2014, at 2:25 PM, Alex Wang wrote:
>
> Yeah,
>
> If we take a ref count, then, there is possibility that threads like
> 'monitor'
> thread can take a reference when main thread is deleting the 'port'
On Nov 26, 2014, at 2:25 PM, Alex Wang wrote:
> Yeah,
>
> If we take a ref count, then, there is possibility that threads like
> 'monitor'
> thread can take a reference when main thread is deleting the 'port'
> => delay the netdev_close
> => if main thread want to immediately recreate the por
Yeah,
If we take a ref count, then, there is possibility that threads like
'monitor'
thread can take a reference when main thread is deleting the 'port'
=> delay the netdev_close
=> if main thread want to immediately recreate the port, it will fail...
So, it is most safe to just acquire the lock
Alex,
Did you consider simply taking a reference instead of the mutex? pros/cons?
Jarno
On Nov 25, 2014, at 4:01 PM, Alex Wang wrote:
> On current master, the 'struct dp_netdev_port' is destroyed
> immediately when the ref count reaches 0. However, non-pmd
> threads calling the dpif_netdev
On Tue, Nov 25, 2014 at 4:01 PM, Alex Wang wrote:
> On current master, the 'struct dp_netdev_port' is destroyed
> immediately when the ref count reaches 0. However, non-pmd
> threads calling the dpif_netdev_execute() for sending packets
> could hold pointer to 'port' that is not ref-counted. Thu
On Tue, Nov 25, 2014 at 4:02 PM, Ben Pfaff wrote:
> On Tue, Nov 25, 2014 at 04:01:40PM -0800, Alex Wang wrote:
> > On current master, the 'struct dp_netdev_port' is destroyed
> > immediately when the ref count reaches 0. However, non-pmd
> > threads calling the dpif_netdev_execute() for sending
On Tue, Nov 25, 2014 at 04:01:40PM -0800, Alex Wang wrote:
> On current master, the 'struct dp_netdev_port' is destroyed
> immediately when the ref count reaches 0. However, non-pmd
> threads calling the dpif_netdev_execute() for sending packets
> could hold pointer to 'port' that is not ref-count
On current master, the 'struct dp_netdev_port' is destroyed
immediately when the ref count reaches 0. However, non-pmd
threads calling the dpif_netdev_execute() for sending packets
could hold pointer to 'port' that is not ref-counted. Thusly
those threads could possibly access freed memory when t