Return-Path: Received: from mail-qk0-f182.google.com ([209.85.220.182]:39386 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932846AbeF2VDx (ORCPT ); Fri, 29 Jun 2018 17:03:53 -0400 Received: by mail-qk0-f182.google.com with SMTP id f3-v6so5708555qkd.6 for ; Fri, 29 Jun 2018 14:03:52 -0700 (PDT) Received: from cakuba.netronome.com ([75.53.12.129]) by smtp.gmail.com with ESMTPSA id k67-v6sm6861813qte.95.2018.06.29.14.03.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Jun 2018 14:03:51 -0700 (PDT) Date: Fri, 29 Jun 2018 14:03:48 -0700 From: Jakub Kicinski To: stable@vger.kernel.org Subject: nfp: don't tell FW about the reserved buffer space Message-ID: <20180629140348.534d4c6e@cakuba.netronome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: Hi! Can we get the following backported to the 4.9 branch? commit 9383b33771e566fa547daa2d09c6e0f1aaa298c3 Author: Jakub Kicinski Date: Thu Mar 2 15:26:20 2017 -0800 nfp: don't tell FW about the reserved buffer space Since commit c0f031bc8866 ("nfp_net: use alloc_frag() and build_skb()") we are allocating buffers which have to hold both the data and skb to be created in place by build_skb(). FW should only be told about the buffer space it can DMA to, that is without the build_skb() headroom and tailroom. Note: firmware applications should validate the buffers against both MTU and free list buffer size so oversized packets would not pass through the NIC anyway. Fixes: c0f031bc8866 ("nfp: use alloc_frag() and build_skb()") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Thank you!