From patchwork Mon Feb 25 17:46:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 2181671 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EAA52DF230 for ; Mon, 25 Feb 2013 17:46:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754734Ab3BYRq4 (ORCPT ); Mon, 25 Feb 2013 12:46:56 -0500 Received: from na3sys010aog109.obsmtp.com ([74.125.245.86]:33692 "HELO na3sys010aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754529Ab3BYRq4 (ORCPT ); Mon, 25 Feb 2013 12:46:56 -0500 Received: from mail-da0-f71.google.com ([209.85.210.71]) (using TLSv1) by na3sys010aob109.postini.com ([74.125.244.12]) with SMTP ID DSNKUSujj64Tu5nQqUJi23Y5HpRXL8MU/TuX@postini.com; Mon, 25 Feb 2013 09:46:56 PST Received: by mail-da0-f71.google.com with SMTP id f4so1971995dal.10 for ; Mon, 25 Feb 2013 09:46:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=x-received:x-received:sender:from:to:cc:subject:date:message-id :x-mailer; bh=gxD9uFsu/7GIBjUuEmEUSKi81kSpJKGstO9avXd1Seg=; b=ErqNHBrCioEQu/ISm5g/nd1S2a4o15qlLcXWb4QPy8/5Y6CynxY74HlzZ3lHJGcp/V OQNswOQr78LWE6HeeXmL/t1df1Byq0vEy88cCzIg1CRKdgP2EQWhROqH327Rrd2skrtG RsyPV2HlLZsBGhPrP3Suie6I00vlzTymv4osc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-received:sender:from:to:cc:subject:date:message-id :x-mailer:x-gm-message-state; bh=gxD9uFsu/7GIBjUuEmEUSKi81kSpJKGstO9avXd1Seg=; b=QoR72yqeL7OdIpJpY0JOAMCGurBgP0i7s/FooN/viZqQz5gqEh1kPoKWZ4H0MPjngy qODtyMKVU1SyXbQs9kGYAGnSU7L5Q9L55nkFJ4aO+SOZoUDeiIJQVFpdv3UmjAyz5PN1 2TXHiVk+piGSx3tbz2TTbzNBNJAAopcE3mrjkSa39j3ZeIzbpUaGNcQGQuKswyK+laSN lsiRHiF1tOC1s/2Ax2s3Vp+HEjiRSoHxwcXxMJgmDrD24kLs5KjC7wNAuuR7hieCsisl RLediq8O00woDt4SO5UfGjRVPjumNAw0DX28G+SzdcARqdQbIe1Xvo4Xh4FgaastwrIF hilQ== X-Received: by 10.68.2.101 with SMTP id 5mr19333104pbt.217.1361814415305; Mon, 25 Feb 2013 09:46:55 -0800 (PST) X-Received: by 10.68.2.101 with SMTP id 5mr19333086pbt.217.1361814415152; Mon, 25 Feb 2013 09:46:55 -0800 (PST) Received: from roland-t410s.purestorage.com ([216.200.155.2]) by mx.google.com with ESMTPS id qb10sm13382682pbb.43.2013.02.25.09.46.53 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Feb 2013 09:46:53 -0800 (PST) From: Roland Dreier To: linux-rdma@vger.kernel.org Cc: Roland Dreier Subject: [PATCH/RFC] IPoIB: Free ipoib neigh on path record failure so path rec queries are retried Date: Mon, 25 Feb 2013 09:46:49 -0800 Message-Id: <1361814409-6704-1-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQlYDV0T0w6PvvKXnzzmrRPzVnzkp0Kq6mo77bLFPDc1HQTILX1WheghsANuq2hoAuqIVNTqcx891K0Oz0H0eNORXl+5nm+AaKWVHRnGb2Qxkr0T5FMKQdQynPZucPcO7ovwU8rN2pS7VNL+PIJOQRRZM5FOOVTWn8hiwwzkjiivcT37iVY= Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Roland Dreier If IPoIB fails to look up a path record (eg if it tries during an SM failover when one SM is dead but the new one hasn't taken over yet), the driver ends up with a neighbour structure but no address handle (AH). There's no mechanism to recover from this: any further packets sent to this destination will be silently dumped in ipoib_start_xmit(). Fix this by freeing the neighbour structures when a path rec query fails, so that the next packet queued to be sent will trigger a new path record query. Signed-off-by: Roland Dreier --- We actually hit this while testing SM failover. Let me know if there are any objections to merging this for 3.9. drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 66d6da9..8534afd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -510,6 +510,9 @@ static void path_rec_completion(int status, spin_unlock_irqrestore(&priv->lock, flags); + if (IS_ERR_OR_NULL(ah)) + ipoib_del_neighs_by_gid(dev, path->pathrec.dgid.raw); + if (old_ah) ipoib_put_ah(old_ah);