Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2874078pxv; Mon, 12 Jul 2021 04:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWSIGePO/RcxBGQODB79XadGRlTYXMQfWKRWvawXl1pkJE9AktmMIuuYECMhq59j3XKvjz X-Received: by 2002:a5d:80cf:: with SMTP id h15mr38944219ior.30.1626088087962; Mon, 12 Jul 2021 04:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626088087; cv=none; d=google.com; s=arc-20160816; b=dY7swtqRCkSpm9Lx5nkpW2+AzvK6dnCDyTZLDEs4Bze/MVONqN8EqXdMCRmTnOiyF3 dQjfMww4gvw48SG49SYbo96kVGh5nO5gnOMcmsb/WYJ1F0LUlUclGF6Z3OJkKNy7Ohpp bh+o4Cc4ZGBedYB//DMX/om1hhMIehKIhs+i7bPiERqWH3u5Z0/tz6ZkjtEGlch54dhC zALXfmvTkx2tAm+hf8p3IWuG3mukErLr+aVXkCirIFbtJqJE3DlmhAKqCTBIrJ1L9yXH zxqs97PJHBe6MljiDic20+iQTyyzJ36tLvPndQO8SYptpSFtYxvS8dfLCdjUDKXPXCG6 btJA== 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=Lh1rljUNYbSH9uKLOmZ6nltPUrZDF5cP6bgaWb+JYl0=; b=mGQIcg6ChhOuYNUVEEz88mRdYbtaWwaCTjZmDKImQ9lk9dOWX0VJYI41/j5fXe7IRS bHhw8TIpfrjsAeB4Gm4cU6hxfW7v6Zuw3ok+oREPwlVjvPZkcELlk6iBmV9tiYff9CmI Xuy4LRQ3wj2AR6K0D9sURmhnOJX7dtY4iznhs6NRHOpNORl5RHVj6kMQCyVLAz82CjZk /zNBLwRF7IoCz693kILz/BJOlYo+wbZheVPslMXz0353+pFd8to/NNnzNpAlCUY4wfNt QfqAlGNL/hRmm9PB18Gk9T99OzLVP6ZW0uApY/xCh7cMyu4eji1QaPQufItwSoLtcEZs qw9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=tM3pEyh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 u12si11703100ilg.116.2021.07.12.04.07.55; Mon, 12 Jul 2021 04:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=tM3pEyh9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229677AbhGLKVZ (ORCPT + 99 others); Mon, 12 Jul 2021 06:21:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbhGLKVX (ORCPT ); Mon, 12 Jul 2021 06:21:23 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E75C0613DD; Mon, 12 Jul 2021 03:18:35 -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=Lh1rljUNYbSH9uKLOmZ6nltPUrZDF5cP6bgaWb+JYl0=; b=tM3pEyh9XfYwXE8hPqqu7i4OFm yU0O24XVPSa9z9lpNvziOR5qHyH13B8yJ9SAXRBKCN6mYWnvLoleRRP7KTda3Jg+P/y3MgHNiOugT QdDY8BWZiyi/h109SQHTqcmNnAZFS/cVtUy06dXI2cvhEmOnuDHkT9IqGXsY9ScAvR8c=; 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 1m2t1A-0004Fq-9D; Mon, 12 Jul 2021 12:18:28 +0200 Subject: Re: [PATCH nf] Revert "netfilter: flowtable: Remove redundant hw refresh bit" To: Pablo Neira Ayuso , Martin Blumenstingl Cc: coreteam@netfilter.org, davem@davemloft.net, fw@strlen.de, kadlec@netfilter.org, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, olek2@wp.pl, roid@nvidia.com References: <20210614215351.GA734@salvia> <20210711010244.1709329-1-martin.blumenstingl@googlemail.com> <20210712094652.GA6320@salvia> From: Felix Fietkau Message-ID: Date: Mon, 12 Jul 2021 12:18:26 +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: <20210712094652.GA6320@salvia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-07-12 11:46, Pablo Neira Ayuso wrote: > Maybe the user reporting this issue is enabling the --hw option? > As I said, the patch that is being proposed to be revert is just > amplifying. > > The only way to trigger this bug that I can find is: > > - NF_FLOWTABLE_HW_OFFLOAD is enabled. > - packets are following the software path. > > I don't see yet how this can happen with upstream codebase, nftables > enables NF_FLOWTABLE_HW_OFFLOAD at configuration time, if the driver > does not support for hardware offload, then NF_FLOWTABLE_HW_OFFLOAD is > not set. > > Is xt_flowoffload rejecting the rule load if user specifies --hw and > the hardware does not support for hardware offload? > > By reading Felix's discussion on the IRC, it seems to me he does not > like that the packet path retries to offload flows. If so, it should > be possible to add a driver flag to disable this behaviour, so driver > developers select what they prefer that flowtable core retries to > offload entries. I can have a look into adding such flag and use it > from the mtk driver. I'd prefer making the retry behavior depend on the error code during setup. For example, if we get -ENOMEM, -EAGAIN or something like that, we should definitely retry. If we get -EOPNOTSUPP or -EINVAL, I don't think a retry makes any sense on any driver. - Felix