From patchwork Tue Feb 7 02:26:26 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: 724867 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vHSrp0S4Wz9s2P for ; Tue, 7 Feb 2017 13:26:34 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c9Bkg9/U"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 93CF930353; Tue, 7 Feb 2017 02:26:32 +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 cKUAVBIZeXdB; Tue, 7 Feb 2017 02:26:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A180A30397; Tue, 7 Feb 2017 02:26:31 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 67B991BFEC6 for ; Tue, 7 Feb 2017 02:26:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B5D7988A02 for ; Tue, 7 Feb 2017 02:26:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id msq0V+6PaKO5 for ; Tue, 7 Feb 2017 02:26:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4B1C682F8C for ; Tue, 7 Feb 2017 02:26:28 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id 194so10629462pgd.0 for ; Mon, 06 Feb 2017 18:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=OVZzdkHfwByRLbtr6IYoRvcp0uF2+UcUPKjS7Qn38pA=; b=c9Bkg9/Ul2SmANvX6x/LVHtIS259SCB2pteHsG5WcsXjsphf9C40hxN/n+kV/hvn/G e3eUr+hSFM/L9RcxqRXC17jwBWB20UzRUI/ta2KElY02qTKENd7TbzZda8CQ0ptmy0Qh 9c47hUyW9qVN/CM8V6KDuaIdm33q4LrHcGmUzGpba+ETboQ82B7LaOZNFJ5G+Pd4xHDR 1O1moFxoZWXuO3yyKp5v0KHIYmmuZUZVzSyLzEB2U7H2GHoqp/FI5JDF0lDQ/P1pSt1V 9vqyxUllbuO0qvpCJMBqzQv7LJJgfUxk9toVMnfRr6xxbpsP5pJnW3LHXZ8XaSmwuEOd uTeg== 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:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=OVZzdkHfwByRLbtr6IYoRvcp0uF2+UcUPKjS7Qn38pA=; b=ll0/vF4LIm0MnUUFAEeuGdy/OGBgAinHRNLeEYulv+YvDNu4G5Lh0YCfPSReqG3/4I GG7L1nmt7CSMlgrxNKQpBirYPD/VG9aHEnHHdEQMUhcW4yVdjGnrgQcLyULAClnGZifJ jTB7QSttNSw59CNq9yG//Vu3tA9F9iHKKdZOfa1qRjyXKWKgA2DjEPsQue98HJ/bwAcg 2ccknwhaNfdCpqIduORhuqbuULo3o0XxHCA4ITXqf83ynggzEm6k1AkJhKIoRZbmWwyt eEfSR2F3izVxQ43tpCO9QfliovsBZBLwDs31dAlAh3K4oTfyFWc4KetA0mY+cAr8opbQ E8fA== X-Gm-Message-State: AIkVDXLs4XMeSc1J1wIygWs4+Gw8QjQXAtCmd2tASZ0GlbY3BmP9TzGNV1YCoJp2nMOz4Q== X-Received: by 10.98.67.72 with SMTP id q69mr16671699pfa.14.1486434387794; Mon, 06 Feb 2017 18:26:27 -0800 (PST) Received: from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0]) by smtp.gmail.com with ESMTPSA id l188sm5802707pfl.28.2017.02.06.18.26.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Feb 2017 18:26:27 -0800 (PST) From: Alexander Duyck To: intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com Date: Mon, 06 Feb 2017 18:26:26 -0800 Message-ID: <20170207022620.9864.29933.stgit@localhost.localdomain> In-Reply-To: <20170207022339.9864.87863.stgit@localhost.localdomain> References: <20170207022339.9864.87863.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [Intel-wired-lan] [next PATCH v5 06/12] igb: Only sync size of expected frame in ethtool testing X-BeenThere: intel-wired-lan@lists.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@lists.osuosl.org Sender: "Intel-wired-lan" From: Alexander Duyck We only need to sync the size of the frame that is read to test. We don't need to sync the entire Rx buffer. This way the testing is more consistent with how we handle things in the receive path. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown --- v4: Split this code out of patch 6 of the original series. drivers/net/ethernet/intel/igb/igb_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 612cf13b7a3a..d5966feb7b96 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -1818,7 +1818,7 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring, /* sync Rx buffer for CPU read */ dma_sync_single_for_cpu(rx_ring->dev, rx_buffer_info->dma, - IGB_RX_BUFSZ, + size, DMA_FROM_DEVICE); /* verify contents of skb */ @@ -1828,7 +1828,7 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring, /* sync Rx buffer for device write */ dma_sync_single_for_device(rx_ring->dev, rx_buffer_info->dma, - IGB_RX_BUFSZ, + size, DMA_FROM_DEVICE); /* unmap buffer on Tx side */