From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pravin Shelar Subject: Re: [PATCH v2] openvswitch: Trim off padding before L3+ netfilter processing Date: Sat, 6 Jan 2018 10:57:56 -0800 Message-ID: References: <1513095439-128864-1-git-send-email-eswierk@skyportsystems.com> <1513869437-20059-1-git-send-email-eswierk@skyportsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: ovs-dev , netdev , Benjamin Warren , Keith Holleman To: Ed Swierk Return-path: Received: from relay2-d.mail.gandi.net ([217.70.183.194]:45447 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbeAFS56 (ORCPT ); Sat, 6 Jan 2018 13:57:58 -0500 Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) (Authenticated sender: pshelar@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 96364C5A51 for ; Sat, 6 Jan 2018 19:57:57 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id 64so7702929wme.3 for ; Sat, 06 Jan 2018 10:57:57 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 5, 2018 at 10:59 PM, Ed Swierk wrote: > > > On Jan 5, 2018 22:17, "Pravin Shelar" wrote: > > On Fri, Jan 5, 2018 at 3:20 PM, Ed Swierk > wrote: >> On Fri, Jan 5, 2018 at 10:14 AM, Ed Swierk >> wrote: >>> On Thu, Jan 4, 2018 at 7:36 PM, Pravin Shelar wrote: >>>> OVS already pull all required headers in skb linear data, so no need >>>> to redo all of it. only check required is the ip-checksum validation. >>>> I think we could avoid it in most of cases by checking skb length to >>>> ipheader length before verifying the ip header-checksum. >>> >>> Shouldn't the IP header checksum be verified even earlier, like in >>> key_extract(), before actually using any of the fields in the IP >>> header? >> >> Something like this for verifying the IP header checksum (not tested): >> > AFAIU openflow does not need this verification, so it is not required > in flow extract. > > > Okay. How about my proposed trimming implementation, caching the pad length > in the ovs cb? > Caching the length is not that simple, OVS actions can change the length. Keeping it consistent with packet would be more work, so lets calculate it in ovs-ct function.