From patchwork Thu Feb 2 10:25:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Abeni X-Patchwork-Id: 9551565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BBED860405 for ; Thu, 2 Feb 2017 10:25:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD7D628404 for ; Thu, 2 Feb 2017 10:25:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B22DC2840B; Thu, 2 Feb 2017 10:25:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57A1B28404 for ; Thu, 2 Feb 2017 10:25:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751039AbdBBKZt (ORCPT ); Thu, 2 Feb 2017 05:25:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49524 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbdBBKZs (ORCPT ); Thu, 2 Feb 2017 05:25:48 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24B8E4DAF7; Thu, 2 Feb 2017 10:25:49 +0000 (UTC) Received: from dhcp-176-80.mxp.redhat.com (dhcp-176-80.mxp.redhat.com [10.32.176.80]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v12APlfW021796; Thu, 2 Feb 2017 05:25:48 -0500 From: Paolo Abeni To: linux-rdma@vger.kernel.org Cc: Doug Ledford , Sean Hefty , Hal Rosenstock Subject: [PATCH] ipoib: clear nfct state on xmit Date: Thu, 2 Feb 2017 11:25:32 +0100 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 02 Feb 2017 10:25:49 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP the skbs can be held by the driver for a long time, so we need to clear any state on xmit to avoid hanging other subsystems. The skbs are already orphaned and dsts are dropped, later in ib/cm code, so we just need to clear the nf state. Do it early, while the ct entry is hopefully still hot in the cache. Signed-off-by: Paolo Abeni --- 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 3ce0765..cb4ddaa 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1050,6 +1050,9 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) struct ipoib_header *header; unsigned long flags; + /* we can held the skb for along time; avoid hanging ct */ + nf_reset(skb); + phdr = (struct ipoib_pseudo_header *) skb->data; skb_pull(skb, sizeof(*phdr)); header = (struct ipoib_header *) skb->data;