From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] net: Add ndo_gso_check Date: Tue, 07 Oct 2014 16:48:02 -0400 (EDT) Message-ID: <20141007.164802.624713385845633192.davem@davemloft.net> References: <20141007.163239.157997964784151921.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: therbert@google.com, jesse@nicira.com, gerlitz.or@gmail.com, alexander.h.duyck@intel.com, john.r.fastabend@intel.com, jeffrey.t.kirsher@intel.com, netdev@vger.kernel.org, tgraf@suug.ch, pshelar@nicira.com, azhou@nicira.com To: alexei.starovoitov@gmail.com Return-path: Received: from shards.monkeyblade.net ([149.20.54.216]:48515 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbaJGUsF (ORCPT ); Tue, 7 Oct 2014 16:48:05 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Alexei Starovoitov Date: Tue, 7 Oct 2014 13:43:09 -0700 > On Tue, Oct 7, 2014 at 1:32 PM, David Miller wrote: >> From: Alexei Starovoitov >> Date: Tue, 7 Oct 2014 13:28:01 -0700 >> >>> On Tue, Oct 7, 2014 at 11:47 AM, David Miller wrote: >>>> >>>> I am totally against boolean "yes/no" protocol specific checksum >>>> validation by HW. >>>> >>>> It's not faster. You have to look at the pseudo-header and bring it into >>>> the CPU cache _anyways_, so negating it and 2's complementing it into >>>> the CHECKSUM_COMPLETE value for validation is free. >>>> >>>> There is no performance advantage whatsoever to use another checksumming >>>> scheme. >>> >>> ok, forget faster/slower argument for a second. >>> Why is it a bad thing to have HW verifying checksums? >> >> Because you have to change the damn hardware and/or firmware for every >> new protocol. > > It is true for existing NICs, but it is not true for upcoming devices. > They're exposing packet parsers to users, so we will be able to > program any protocol into the device without reflashing it. > Some of the guys are even allowing reprogramming the parser > while packets are flowing. So we have to write new software in _EVERY_ driver to accomodate this. That makes zero sense either, and it is unneeded complexity in the hardware. COMPLETE works everywhere, on everything, with no driver changes, and is so much harder to get wrong. Every protocol specific feature has major downsides whether you choose to see them or not.