Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-17 Thread David Miller
From: "Michael Chan" <[EMAIL PROTECTED]> Date: Mon, 05 Jun 2006 12:47:32 -0700 > Herbert Xu pointed out that it is unsafe to call netif_tx_disable() > from LLTX drivers because it uses dev->xmit_lock to synchronize > whereas LLTX drivers use private locks. > > Convert tg3 to non-LLTX to fix this

Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread Michael Chan
On Mon, 2006-06-05 at 17:31 -0700, Stephen Hemminger wrote: > On Mon, 05 Jun 2006 14:29:45 -0700 > "Michael Chan" <[EMAIL PROTECTED]> wrote: > > > On Mon, 2006-06-05 at 15:58 -0700, Stephen Hemminger wrote: > > > > > > > > Since you are going more lockless, you probably need memory barriers. > >

Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread Stephen Hemminger
On Mon, 05 Jun 2006 14:29:45 -0700 "Michael Chan" <[EMAIL PROTECTED]> wrote: > On Mon, 2006-06-05 at 15:58 -0700, Stephen Hemminger wrote: > > > > > Since you are going more lockless, you probably need memory barriers. > > No, we're not going more lockless. We're simply replacing the private >

Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread Michael Chan
On Mon, 2006-06-05 at 15:58 -0700, Stephen Hemminger wrote: > > Since you are going more lockless, you probably need memory barriers. No, we're not going more lockless. We're simply replacing the private tx_lock with dev->xmit_lock by dropping the LLTX feature flag. The amount of locking is exac

Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread David Miller
From: Stephen Hemminger <[EMAIL PROTECTED]> Date: Mon, 5 Jun 2006 15:58:34 -0700 > Perhaps there is something simpler that could be done with a ring > model and some atomic primitives like cmpxchg()? cmpxchg() is something not available natively on many platforms, you can't even emulate it %100 p

Re: [PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread Stephen Hemminger
On Mon, 05 Jun 2006 12:47:32 -0700 "Michael Chan" <[EMAIL PROTECTED]> wrote: > Herbert Xu pointed out that it is unsafe to call netif_tx_disable() > from LLTX drivers because it uses dev->xmit_lock to synchronize > whereas LLTX drivers use private locks. > > Convert tg3 to non-LLTX to fix this is

[PATCH 2.6.18 2/3] tg3: Convert to non-LLTX

2006-06-05 Thread Michael Chan
Herbert Xu pointed out that it is unsafe to call netif_tx_disable() from LLTX drivers because it uses dev->xmit_lock to synchronize whereas LLTX drivers use private locks. Convert tg3 to non-LLTX to fix this issue. tg3 is a lockless driver where hard_start_xmit and tx completion handling can run c