Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2517040imm; Mon, 28 May 2018 09:34:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrMpWfuYhcN86UYHe17evP1vnSVxM+Wjqkk34kCrzA2Oq5mKE4ANDB90k4n3hvnSR1zXIqQ X-Received: by 2002:a17:902:b946:: with SMTP id h6-v6mr14719389pls.3.1527525254789; Mon, 28 May 2018 09:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527525254; cv=none; d=google.com; s=arc-20160816; b=VC1+o1Zj9RuRHeRXFtwGy0R6ruoH8hT9Rkn2TOL5N4FaG5WAHQ0+/QQKtdUrJCQGSI OO8ux2B01YrSqmpuifTABGQNeiF/XKjeWT0V6DEgNJT0o2XOQY3gDpO7kpPT7BwfBEt8 zvTYdTdn1Afe032Orf+hrIJ8o5q3wSFs86wQekTkEJI6UglWFSl+0DUdS5wIU6SbndZP GzbeBIkQm2SvcbtGAMcbsJSTaklNayIGudstGYL9bfFPlVD85Q0eXaaBIClvdPcKjD4l EvBOuY+jUMGp6qN78er91OBNgqj6a0tVSzP6F7A6W/Sk9Hb7ijIzuG8cQdUCiMfR4Wpw EEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VJKYEyH+2lkqfwknlPGn6fK8sUPf16HW/Ywhy8heyBM=; b=Vse2Wh6z9GVMkr3korxWygCvb4Jh2YUFdlxkCOC1whRN67rkzocmDpXHPiiWuJ85F5 VCyfXcgZ6npjt2vni40+FR06GUypIZom/yGy05uTuJstGiKrFO4otFcEn6ZFwDemRFz5 aLnejzYNgbY7qZAm/oaaig/SC4EagnieOqXgEWjaB3xUkFlFn2ML4/kHJbFdrKkjCfrz K6f4B4w7RmNQ/AcRXu8/zYT4G19Ij4w8zEcnhAFtbVxrmRyiAXADy8Ywv+juPJ+PFF6v T/VJOv4yUA0/5lxHwbKMCOvevcbnMjutj8Lq3SW+Ts0GjOvsu3zRPty66DoS1YV43W+Q W1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=We5b7tn7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12-v6si24507701pgf.294.2018.05.28.09.33.59; Mon, 28 May 2018 09:34:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=We5b7tn7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940115AbeE1Qdb (ORCPT + 99 others); Mon, 28 May 2018 12:33:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:57162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935006AbeE1KJD (ORCPT ); Mon, 28 May 2018 06:09:03 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 046882086D; Mon, 28 May 2018 10:09:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502142; bh=VNgQtmXpw0gb4s9bH+7m1aFpjw1j9ocZtwlRNxIE2RU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=We5b7tn77Vl3hdVNJIOc3z0lh9x1QF8mLM3P37ukAIs0UadJ6Wclzgtt2LkayC94r x2HR4zuBoYLM4BnRpaKeqblNNTg7tTVwj0BedYdS3qNfNiV/qcL+0SdzNFftlu99e2 2d/HEA4z4D45rBHHKPJAKSL7+wKKsgKFF89qFOk8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" , Sasha Levin Subject: [PATCH 3.18 078/185] r8152: fix tx packets accounting Date: Mon, 28 May 2018 12:01:59 +0200 Message-Id: <20180528100057.336536682@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet [ Upstream commit 4c27bf3c5b7434ccb9ab962301da661c26b467a4 ] r8152 driver handles TSO packets (limited to ~16KB) quite well, but pretends each TSO logical packet is a single packet on the wire. There is also some error since headers are accounted once, but error rate is small enough that we do not care. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1590,7 +1590,7 @@ static int r8152_tx_agg_fill(struct r815 tx_data += len; agg->skb_len += len; - agg->skb_num++; + agg->skb_num += skb_shinfo(skb)->gso_segs ?: 1; dev_kfree_skb_any(skb);