From patchwork Sun Oct 22 01:12:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander H Duyck X-Patchwork-Id: 828977 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="YUCZjQAI"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKM2r4JrMz9t2V for ; Sun, 22 Oct 2017 12:12:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 14E8B88045; Sun, 22 Oct 2017 01:12:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id THT9n8RtxG5x; Sun, 22 Oct 2017 01:12:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E14B187FEB; Sun, 22 Oct 2017 01:12:33 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 529831C0AEA for ; Sun, 22 Oct 2017 01:12:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4907B2A148 for ; Sun, 22 Oct 2017 01:12:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gFv5pnAc40Jw for ; Sun, 22 Oct 2017 01:12:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by silver.osuosl.org (Postfix) with ESMTPS id 999F42666B for ; Sun, 22 Oct 2017 01:12:32 +0000 (UTC) Received: by mail-it0-f65.google.com with SMTP id n195so2405883itg.2 for ; Sat, 21 Oct 2017 18:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=TIZOwssSGyGtiTET6EqesZjx49WTUIGCgKKcsjVDWZ0=; b=YUCZjQAIZK00pDYDcFHFuh0e+x0oaP1I98SBLglIFg/04V0Xm3nqE4z9JzL9nHvf5v RaFy7z8QoLqDGiFahxNLxBZow7AMb3s07UG+RUDvvDY5l763MaG23/LFaGgCvtYDB4d0 izak/SRthRLg1br8Mn6wMpUrn62dW6vihcdcqsnh0w808fZ+TBAnRp1RLNeRTpuqpOAB YdEPdEyYcXXcrLmzqoa/rANAlGACBC/M7AoRuDRgNpw0pEhP8p8ko3cKQcS0JVEf2w5U BuSw/8ILzH7sDRxgL0mgk9ijhF1UqvRQVAi/EgIZz3Wqc35WgF9ICva9zAPHwBYUzfve tYHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=TIZOwssSGyGtiTET6EqesZjx49WTUIGCgKKcsjVDWZ0=; b=AWppLrKyvP3XeInYXbpmvLrds0SahpWf5vjDirWQcoDYCu+8yV/6MOInPOjt/uwVM+ 1KyJBv8eJWB7i2iMWbAQdgLArrE7D21JwMfFeSD6qtHX5Q02gzme1Z+dJe5h0ILZBjzS ZCGrNOszxc4KlL1632MpRD9E4PMGIPFmjPJku2acdGkdUxf7tHYPmfVDNbc8dH4uTz0d IYutFmlD3FbmyrIPaWdj710NaMxzUEOV9WqC7Hc3fShaHjVPxp39S3raGuXyEkxIFTyL oumYa+ItXyNmLlvmvBFMeSZFBrkWeD18b7TboeAs1gRVzp3OdKTlUVluTflFETkbwhOG f78w== X-Gm-Message-State: AMCzsaWxtw0uGT5vTWVtkZCzFLl06OAhgODdqMmrsasKTYyMDpuD1Vhq D9kmnLNyoV40TprEMlk8DlU= X-Google-Smtp-Source: ABhQp+RJydri0noORcCzchlmqK+iLomFd5k3ewJYQlJ2DxOZaHblUrAgLyAQ5FSTrNfJQkmm2iAPNw== X-Received: by 10.36.36.19 with SMTP id f19mr4008349ita.96.1508634751903; Sat, 21 Oct 2017 18:12:31 -0700 (PDT) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id w96sm1886401ioe.76.2017.10.21.18.12.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Oct 2017 18:12:31 -0700 (PDT) From: Alexander Duyck To: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, akp@cohaesio.com, pstaszewski@itcare.pl Date: Sat, 21 Oct 2017 18:12:29 -0700 Message-ID: <20171022011222.12997.53593.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [jkirsher/net-queue PATCH] i40e: Add programming descriptors to cleaned_count X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck This patch updates the i40e driver to include programming descriptors in the cleaned_count. Without this change it becomes possible for us to leak memory as we don't trigger a large enough allocation when the time comes to allocate new buffers and we end up overwriting a number of rx_buffers equal to the number of programming descriptors we encountered. Fixes: 0e626ff7ccbf ("i40e: Fix support for flow director programming status") Signed-off-by: Alexander Duyck Tested-by: Anders K. Pedersen --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 368722defacb..d6d352a6e6ea 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -2102,6 +2102,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget) if (unlikely(i40e_rx_is_programming_status(qword))) { i40e_clean_programming_status(rx_ring, rx_desc, qword); + cleaned_count++; continue; } size = (qword & I40E_RXD_QW1_LENGTH_PBUF_MASK) >>