netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in which arp entries have their probe timer expire
@ 2008-03-11 17:34 Neil Horman
  2008-03-13  7:02 ` [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in whicharp " Divy Le Ray
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2008-03-11 17:34 UTC (permalink / raw)
  To: divy, agospoda, davem, netdev, jeff; +Cc: nhorman


Recently commit 4eb61e0231be536d8116457b67b3e447bbd510dc went in to handle arp
completion events in the cxgb driver.  This was done to catch arp events for
which the corresponding entry was marked stale.  This was done to prevent RDMA
connection failures.  However the preceding patch misses a case.  While checking
for NUD_STALE states allows the processing of arp entries that were completed
due to arp requests rather than arp replies, it fails to catch arp entries that
have had their probe timer expire (NUD_PROBE).  It seems the same failure can
occur in that case.  By changing the check from NUD_CONNECTED|NUD_STALE to
NUD_VALID, we can catch the previous set of events and add exprired/revalidated
arp entries to the set of handled cases as well.

Regards
Neil

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


l2t.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/cxgb3/l2t.c b/drivers/net/cxgb3/l2t.c
index 865faee..3faf3d6 100644
--- a/drivers/net/cxgb3/l2t.c
+++ b/drivers/net/cxgb3/l2t.c
@@ -404,7 +404,7 @@ found:
 			if (neigh->nud_state & NUD_FAILED) {
 				arpq = e->arpq_head;
 				e->arpq_head = e->arpq_tail = NULL;
-			} else if (neigh->nud_state & (NUD_CONNECTED|NUD_STALE))
+			} else if (neigh->nud_state & NUD_VALID)
 				setup_l2e_send_pending(dev, NULL, e);
 		} else {
 			e->state = neigh_is_connected(neigh) ?
-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in whicharp entries have their probe timer expire
  2008-03-11 17:34 [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in which arp entries have their probe timer expire Neil Horman
@ 2008-03-13  7:02 ` Divy Le Ray
  2008-03-13 17:47   ` Neil Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Divy Le Ray @ 2008-03-13  7:02 UTC (permalink / raw)
  To: Neil Horman; +Cc: agospoda, davem, netdev, jeff

Neil Horman wrote:
>
> Recently commit 4eb61e0231be536d8116457b67b3e447bbd510dc went in to 
> handle arp
> completion events in the cxgb driver.  This was done to catch arp 
> events for
> which the corresponding entry was marked stale.  This was done to 
> prevent RDMA
> connection failures.  However the preceding patch misses a case.  
> While checking
> for NUD_STALE states allows the processing of arp entries that were 
> completed
> due to arp requests rather than arp replies, it fails to catch arp 
> entries that
> have had their probe timer expire (NUD_PROBE).  It seems the same 
> failure can
> occur in that case.  By changing the check from NUD_CONNECTED|NUD_STALE to
> NUD_VALID, we can catch the previous set of events and add 
> exprired/revalidated
> arp entries to the set of handled cases as well.
>

Hi Neil,

I don't see transitions to NUD_PROBE triggering netevent notifications.
This patch would not alter the current behaviour.
The idea behind the implementation is that NUD_PROBE is considered as
an intermediate state rather than indicating a completion.

I'm inclined to NAK the patch.

Cheers,
Divy



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in whicharp entries have their probe timer expire
  2008-03-13  7:02 ` [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in whicharp " Divy Le Ray
@ 2008-03-13 17:47   ` Neil Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Horman @ 2008-03-13 17:47 UTC (permalink / raw)
  To: Divy Le Ray; +Cc: agospoda, davem, netdev, jeff

On Thu, Mar 13, 2008 at 12:02:45AM -0700, Divy Le Ray wrote:
> Neil Horman wrote:
>>
>> Recently commit 4eb61e0231be536d8116457b67b3e447bbd510dc went in to handle 
>> arp
>> completion events in the cxgb driver.  This was done to catch arp events 
>> for
>> which the corresponding entry was marked stale.  This was done to prevent 
>> RDMA
>> connection failures.  However the preceding patch misses a case.  While 
>> checking
>> for NUD_STALE states allows the processing of arp entries that were 
>> completed
>> due to arp requests rather than arp replies, it fails to catch arp entries 
>> that
>> have had their probe timer expire (NUD_PROBE).  It seems the same failure 
>> can
>> occur in that case.  By changing the check from NUD_CONNECTED|NUD_STALE to
>> NUD_VALID, we can catch the previous set of events and add 
>> exprired/revalidated
>> arp entries to the set of handled cases as well.
>>
>
> Hi Neil,
>
> I don't see transitions to NUD_PROBE triggering netevent notifications.
> This patch would not alter the current behaviour.
> The idea behind the implementation is that NUD_PROBE is considered as
> an intermediate state rather than indicating a completion.
>
> I'm inclined to NAK the patch.
Oh, you're right.  I was thinking that the nud_state & (NUD_INCOMPPLETE
|NUD_PROBE) clause would set the notify flag and we'd get the notification.  But
to fall into that clause, we'd need to also exceede our max probe count, which
then puts us into NUD_FAILED state.

Patch is recinded.

Regards
Neil

>
> Cheers,
> Divy
>

-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-13 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 17:34 [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in which arp entries have their probe timer expire Neil Horman
2008-03-13  7:02 ` [PATCH] cxgb3: enhance t3_l2t_update to catch netevents in whicharp " Divy Le Ray
2008-03-13 17:47   ` Neil Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).