Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3114920pxj; Mon, 14 Jun 2021 14:58:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxQvK9SOhlDZwI/wzLznGdnCnpudoWIaWE5NzfaW7rZHIdrIBa9sJxfANkX4tmUuYm4HFB X-Received: by 2002:a17:906:7d8d:: with SMTP id v13mr17075877ejo.2.1623707932179; Mon, 14 Jun 2021 14:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623707932; cv=none; d=google.com; s=arc-20160816; b=PFQkP7xMYMPgVMOq3WluGONf2KAEd9R+b4YuWv7Z7Jx9GVShwAVJtj1o2PlotSsEUs J0VeXUgWwaofFQIPUcjZasP+yFC3unHBawy0ag2nPQZQWUS4fS3fdzfds1czHvBT+trB BfSVx0gBUBC3xPZcDfsLkVnslQubhNssZFquYWJ3OZDvp76rilW+b04g7c6Vn9cWAvQM ffIWtEQEi02UL3BIErLuA8I8MwN/lgs1di0ZzqJawQGK8vXkLNsdl+9BCRMnEcmahGsO a1oz57vrWpdOR62XNqZJteGI/yR7uGs16r1giL9B/58QqXkuSGuPj3kwZ6OokD01hHBw Lo2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=gHHQr75RgdFZSyqi5aBRjZJHc+FJpjqw4aR3voBz1ZE=; b=ez/0Fn4E97fH1UhbjPfWMef1TpDaLfvTtGjrDeN0xPLve7bMhZWgrlzYPXEWEsi1Yo JPSblEVIxpxmw/dmKgNCJm3+GxX+rLeU9ua4LHBf3k6FN9X+tOe5Top1sbIMYFAw97Xa Fh1ml8xN3lpGv/zDCukD1yVf3PgreKtRxH/gl/sr0FVmsxZk1d6PHAvQq6av0T4fuAQe hsih0BPP5SIYpU1TA2eWi+wOFY7gtwuc0vaOBaInY4F6JUMfk58/1LCQw7P4egIf/bSf ioQZcSZuwlqJy2Vwm5PBbobFxN0Hw/tBH1tBeRo4AzmqZIC3HjREl/r5m8WQZHBaPJeH Ulqg== ARC-Authentication-Results: i=1; mx.google.com; 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 u26si12753640ejz.348.2021.06.14.14.58.29; Mon, 14 Jun 2021 14:58:52 -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; 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 S231286AbhFNV5B (ORCPT + 99 others); Mon, 14 Jun 2021 17:57:01 -0400 Received: from mail.netfilter.org ([217.70.188.207]:42444 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbhFNV4w (ORCPT ); Mon, 14 Jun 2021 17:56:52 -0400 Received: from netfilter.org (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id 2988664229; Mon, 14 Jun 2021 23:52:37 +0200 (CEST) Date: Mon, 14 Jun 2021 23:53:51 +0200 From: Pablo Neira Ayuso To: Aleksander Jan Bajkowski Cc: kadlec@netfilter.org, fw@strlen.de, davem@davemloft.net, kuba@kernel.org, roid@nvidia.com, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH nf] Revert "netfilter: flowtable: Remove redundant hw refresh bit" Message-ID: <20210614215351.GA734@salvia> References: <20210614193440.3813-1-olek2@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210614193440.3813-1-olek2@wp.pl> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Jun 14, 2021 at 09:34:40PM +0200, Aleksander Jan Bajkowski wrote: > This reverts commit c07531c01d8284aedaf95708ea90e76d11af0e21. > > The previously mentioned commit significantly reduces NAT performance > in OpenWRT. Another user reports a high ping issue. The results of > IPv4 NAT benchmark on BT Home Hub 5A (with software flow offloading): > * 5.4.124 515 Mb/s > * 5.10.41 570 Mb/s > * 5.10.42 250 Mb/s > * 5.10.42 + revert 580 Mb/s > > Reverting this commit fixes this issue. The xt_flowoffload module is inconditionally setting on the hardware offload flag: static int __init xt_flowoffload_tg_init(void) { int ret; register_netdevice_notifier(&flow_offload_netdev_notifier); ret = init_flowtable(&flowtable[0]); if (ret) return ret; ret = init_flowtable(&flowtable[1]); if (ret) goto cleanup; flowtable[1].ft.flags = NF_FLOWTABLE_HW_OFFLOAD; [...] which is triggering the slow down because packet path is allocating work to offload the entry to hardware, however, this driver does not support for hardware offload. Probably this module can be updated to unset the flowtable flag if the harware does not support hardware offload.