From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [Patch net] net_sched: refetch skb protocol for each filter Date: Mon, 14 Jan 2019 11:55:49 -0800 Message-ID: References: <20190112025542.397-1-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Martin Olsson , Jamal Hadi Salim , Jiri Pirko To: Daniel Borkmann Return-path: Received: from mail-pf1-f180.google.com ([209.85.210.180]:46799 "EHLO mail-pf1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726745AbfANT4C (ORCPT ); Mon, 14 Jan 2019 14:56:02 -0500 Received: by mail-pf1-f180.google.com with SMTP id c73so89007pfe.13 for ; Mon, 14 Jan 2019 11:56:01 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jan 14, 2019 at 1:23 AM Daniel Borkmann wrote: > Can't we do something like the below instead? Otherwise we'll needlessly refetch > protocol every time there is a mismatch in above tp->protocol check as well. Does this save anything given the fact we simply return if err>=0? The protocol must be fetched, either before the loop or inside the loop, before this "if err>=0". If we return, it won't be refetched even with my patch. If we don't, it has to be refetched again. So, I don't see any difference here.