Re: [Patch 2/2] mlx4: add dynamic LRO disable support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ben Hutchings
Date: Friday, June 4, 2010 - 7:25 am

On Fri, 2010-06-04 at 09:56 +0800, Cong Wang wrote:

In both cases there is a race condition but it is harmless so long as
the read and the write are atomic.  There is a general assumption in
networking code that this is the case for int and long.  Personally I
would prefer to see this made explicit using ACCESS_ONCE(), but I don't
see any specific problem in mlx4 (not that I'm familiar with this driver
either).

Now that I look at the patch again, I see you're using a static (i.e.
global) variable to 'back up' the non-zero (enabled) value of num_lro.
This is introducing a bug!  The correct value is apparently set in
mlx4_en_get_profile(); you would need to replicate that.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch 1/2] s2io: add dynamic LRO disable support, Amerigo Wang, (Wed Jun 2, 8:38 pm)
[Patch 2/2] mlx4: add dynamic LRO disable support, Amerigo Wang, (Wed Jun 2, 8:39 pm)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Ben Hutchings, (Thu Jun 3, 5:37 am)
Re: [Patch 1/2] s2io: add dynamic LRO disable support, Michal Schmidt, (Thu Jun 3, 6:38 am)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Ben Hutchings, (Fri Jun 4, 7:25 am)
RE: [Patch 1/2] s2io: add dynamic LRO disable support, Ramkrishna Vepa, (Sat Jun 5, 1:53 am)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Stanislaw Gruszka, (Mon Jun 7, 4:00 am)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Stanislaw Gruszka, (Wed Jun 9, 3:49 am)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Stanislaw Gruszka, (Tue Jun 15, 2:39 am)
Re: [Patch 2/2] mlx4: add dynamic LRO disable support, Stanislaw Gruszka, (Thu Jun 17, 5:03 am)