Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp185273pxv; Wed, 14 Jul 2021 01:22:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzND5HM5b/h1WWY6BMCwkQii8Hvbnc1CKCNO3p2eNFiKZUoHyXVWvaCDq7UcxAM4HZj0QWc X-Received: by 2002:a5d:9c02:: with SMTP id 2mr6291170ioe.152.1626250940953; Wed, 14 Jul 2021 01:22:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626250940; cv=none; d=google.com; s=arc-20160816; b=eFXOSDXXsx5xBCpw7rZmt79uPR3pyXTdmX9s497fhQVKh5jvL68nKOuEzU08umoSfj XzqSResv2rn/+SeYzAsy8/ncw6Ix/ek76Muf535p+6TLmWu2DMhWcEdPM/oucae7U+Dk lbff8suamk2uQ4wdigHMJtsTcLyp2tvuX0hynwqk9Uct745eBl1+dYSRNyVIMvdW01rx VmULwZTw2mYZFJv0rnhRRn4+6Kddy5vD3IrjN1JfsdqCLvTXVIMKh8JTjmEU1QIwIo/O V66eTeS685ZpMsa4irDJpLRd+Tu1d0OFCjesHeRgc+Sdp1/2z//rvaeH9ZDt+tGtpl2X QTNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=nzsplCvQ+cF/ppxUb65LEoPjQpMcxc9NYIBsyj3BvMU=; b=v6G9jDkO2pXEsAuNT2SD6TDHFLx4/1IEGfcsHedVsGeZAFfpDhg8/HK+koK3D63BiI vfEiAAdzu2xbq0TMOzxymwag+f81SMYO6u6fia5MZRAqdxzfuwcSYTw+CUGMUGa54Nml OyK0kJ8Ad/jYPlhEuHuAFMim7kheypqSpZ6VvjD0XgzIWNSUrPhMkljGlQUrLiLqmhUn n6Unq5zFfD+hqkq2JUJbV95EwTIM8/DyRVufyRZbVtfjDbQOStnvPH9eQ2buSOdb39wS XNEGbMYyboJnUcCWagvWouTaP5efaHIyDcvftqAi5HXBjmQoffkkWVN+VcU69Q0Al8ol 4hPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="c/c2ZXqE"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si1659724ilv.18.2021.07.14.01.22.09; Wed, 14 Jul 2021 01:22:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="c/c2ZXqE"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238484AbhGNIYF (ORCPT + 99 others); Wed, 14 Jul 2021 04:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238375AbhGNIYE (ORCPT ); Wed, 14 Jul 2021 04:24:04 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3313DC061760; Wed, 14 Jul 2021 01:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nzsplCvQ+cF/ppxUb65LEoPjQpMcxc9NYIBsyj3BvMU=; b=c/c2ZXqEuU+hWvW0hbbHOQpZou UtLjeCalmcgs6VEwTg0g3eH2C0QaDE2BbOrwVninvDD3L0YBDq3NzY1Rk3IQBMS2o7fxaeuFnugkQ 7ook/JviJRqjcBZzXokVB7U6YGbBQWtMMsNir8yxwI7sVMNXFjo6FTz17vhyJtgn9vcU=; Received: from p54ae93f7.dip0.t-ipconnect.de ([84.174.147.247] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1m3a8j-0000xF-Hj; Wed, 14 Jul 2021 10:21:09 +0200 Subject: Re: [RFC 3/7] net: ethernet: mtk_eth_soc: implement flow offloading to WED devices To: Pablo Neira Ayuso Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, ryder.lee@mediatek.com References: <20210713160745.59707-1-nbd@nbd.name> <20210713160745.59707-4-nbd@nbd.name> <20210713184002.GA26070@salvia> From: Felix Fietkau Message-ID: <544dcb50-a661-f230-5149-ec1a356b7665@nbd.name> Date: Wed, 14 Jul 2021 10:21:08 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210713184002.GA26070@salvia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-07-13 20:40, Pablo Neira Ayuso wrote: > On Tue, Jul 13, 2021 at 06:07:41PM +0200, Felix Fietkau wrote: > [...] >> diff --git a/net/core/dev.c b/net/core/dev.c >> index c253c2aafe97..7ea6a1db0338 100644 >> --- a/net/core/dev.c >> +++ b/net/core/dev.c >> @@ -885,6 +885,10 @@ int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr, >> if (WARN_ON_ONCE(last_dev == ctx.dev)) >> return -1; >> } >> + >> + if (!ctx.dev) >> + return ret; > > This is not a safety check, right? After this update ctx.dev might be NULL? Right. I added this check to be able to prevent dev_fill_forward_path from adding an extra DEV_PATH_ETHERNET entry, which is not applicable for wlan devices. - Felix