Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4051256ybe; Mon, 9 Sep 2019 03:27:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq9/nvx1e0GID5auGTYE8qW5f05qKlTxOg7kmxoFMuCOqFIBp/wF8lExqDfJcL4xT4/f6b X-Received: by 2002:a50:d552:: with SMTP id f18mr23835062edj.36.1568024850140; Mon, 09 Sep 2019 03:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568024850; cv=none; d=google.com; s=arc-20160816; b=ul89K+2e5clXSV0yPrMKcd0B8LsLrblBuwOiMLzFd5xMmJso5F0UrgkHapQCv1TXqy PBZrPHkZsqp0e5MI4VPAYu9U88SFHaTXiDbqNsRScxRV9PmuKkynzLua4eIFg6mJR8zy HG+W5fjjQXumRoU6ys2Mxu/kWBZ+7+/mSf2bSHCxmO/zI4Ib1cR6YFigAaniEZbiaB+7 nsIflOylVs6sbLKnhyboTVqklgpOC3akq36kL1omxe9XnFISYTig3ZreV2E5Svmx2YtT 6Sy/lnn4xm8tciyHlw+ucobfZv3yqKMVtXRW3zIzNnvEAudLQpAmmLhPrr1E9AZ2USsm e81w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=taC8MGXF9ogyYnwud4c6YPjZ2727ute56G1OO8SSmP4=; b=Df4nOcoq9cdvnHvWBy8VUzwwKgu7Ky/tgf2bxcPNe5TLb5UhoeCkKFqJJLcLf4wt+n 38KNo/eU0ovstdd+xIG7RIJnTPfwD84vZwa4h+1u8J62ePrACOjXiq8hRHKZWj362pfX Y/2gZFjobuuLRafY7hFZzeWPVgWnWNqgT1eOPhLY8GLfNlaG/8e+qI+72BvW9xApH+wN 2EwOMGQSvPKLTJHlFdoO8YyXc2W79rb/BbkeH6ze6Pt2RGjHyTZuxPd3sNq2XNcNU036 hFq5OLxuGQadP7/GNK4e78lzEA02w2m1cvQrWc+gSxQsxZj6kGdaDhsofH4iGjF81nd6 Zl2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ucVqttKA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si8925496edd.35.2019.09.09.03.27.06; Mon, 09 Sep 2019 03:27:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ucVqttKA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732266AbfIHMup (ORCPT + 99 others); Sun, 8 Sep 2019 08:50:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:41540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732167AbfIHMuf (ORCPT ); Sun, 8 Sep 2019 08:50:35 -0400 Received: from localhost (unknown [62.28.240.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B222D218AC; Sun, 8 Sep 2019 12:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567947035; bh=OU5sRkIuCfKQiVSPfsr9XsoOMgGbWeD8aZXvsxeh+Cc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ucVqttKA8ZJqHYHY6hZWPF8jFPUbP9oqzazcxyBKWsvFThun2POZOvElUxQ8ANmmt tvsRGLuBY4EHqP+VFQ5OpfKhffKJd3b5hN39F+H6dJEnYB63SXMGy+vCsYgW/EyCJL XWL4Z2lFUrTfUZvOpeZbMOuJCrKesFf96wWrN2WY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Hurley , Simon Horman , Jakub Kicinski , "David S. Miller" Subject: [PATCH 5.2 09/94] nfp: flower: handle neighbour events on internal ports Date: Sun, 8 Sep 2019 13:41:05 +0100 Message-Id: <20190908121150.697700293@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190908121150.420989666@linuxfoundation.org> References: <20190908121150.420989666@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: John Hurley [ Upstream commit e8024cb483abb2b0290b3ef5e34c736e9de2492f ] Recent code changes to NFP allowed the offload of neighbour entries to FW when the next hop device was an internal port. This allows for offload of tunnel encap when the end-point IP address is applied to such a port. Unfortunately, the neighbour event handler still rejects events that are not associated with a repr dev and so the firmware neighbour table may get out of sync for internal ports. Fix this by allowing internal port neighbour events to be correctly processed. Fixes: 45756dfedab5 ("nfp: flower: allow tunnels to output to internal port") Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +++ b/drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c @@ -329,13 +329,13 @@ nfp_tun_neigh_event_handler(struct notif flow.daddr = *(__be32 *)n->primary_key; - /* Only concerned with route changes for representors. */ - if (!nfp_netdev_is_nfp_repr(n->dev)) - return NOTIFY_DONE; - app_priv = container_of(nb, struct nfp_flower_priv, tun.neigh_nb); app = app_priv->app; + if (!nfp_netdev_is_nfp_repr(n->dev) && + !nfp_flower_internal_port_can_offload(app, n->dev)) + return NOTIFY_DONE; + /* Only concerned with changes to routes already added to NFP. */ if (!nfp_tun_has_route(app, flow.daddr)) return NOTIFY_DONE;