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: Fri, 5 Jan 2018 22:17:26 -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 , Linux Kernel Network Developers , Benjamin Warren , Keith Holleman To: Ed Swierk Return-path: Received: from relay2-d.mail.gandi.net ([217.70.183.194]:35407 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783AbeAFGR2 (ORCPT ); Sat, 6 Jan 2018 01:17:28 -0500 Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) (Authenticated sender: pshelar@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 58A88C5A44 for ; Sat, 6 Jan 2018 07:17:27 +0100 (CET) Received: by mail-wr0-f172.google.com with SMTP id o15so5998321wrf.12 for ; Fri, 05 Jan 2018 22:17:27 -0800 (PST) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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.