All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Coiby Xu <coiby.xu@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-staging@lists.linux.dev, netdev@vger.kernel.org,
	Shung-Hsi Yu <shung-hsi.yu@suse.com>,
	Manish Chopra <manishc@marvell.com>,
	"supporter:QLOGIC QLGE 10Gb ETHERNET DRIVER"
	<GR-Linux-NIC-Dev@marvell.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 01/19] staging: qlge: fix incorrect truesize accounting
Date: Wed, 23 Jun 2021 13:55:15 +0900	[thread overview]
Message-ID: <YNK+s9Rm7OtL++YM@d3> (raw)
In-Reply-To: <20210622113649.vm2hfh2veqr4dq6y@Rk>

On 2021-06-22 19:36 +0800, Coiby Xu wrote:
> On Mon, Jun 21, 2021 at 05:10:27PM +0300, Dan Carpenter wrote:
> > On Mon, Jun 21, 2021 at 09:48:44PM +0800, Coiby Xu wrote:
> > > Commit 7c734359d3504c869132166d159c7f0649f0ab34 ("qlge: Size RX buffers
> > > based on MTU") introduced page_chunk structure. We should add
> > > qdev->lbq_buf_size to skb->truesize after __skb_fill_page_desc.
> > > 
> > 
> > Add a Fixes tag.
> 
> I will fix it in next version, thanks!
> 
> > 
> > The runtime impact of this is just that ethtool will report things
> > incorrectly, right?  It's not 100% from the commit message.  Could you
> > please edit the commit message so that an ignoramous like myself can
> > understand it?

truesize is used in socket memory accounting, the stuff behind sysctl
net.core.rmem_max, SO_RCVBUF, ss -m, ...

Some helpful chap wrote a page about it a while ago:
http://vger.kernel.org/~davem/skb_sk.html

> 
> I'm not sure how it would affect ethtool. But according to "git log
> --grep=truesize", it affects coalescing SKBs. Btw, I fixed the issue
> according to the definition of truesize which according to Linux Kernel
> Network by Rami Rosen, it's defined as follows,
> > The total memory allocated for the SKB (including the SKB structure
> > itself and the size of the allocated data block).
> 
> I'll edit the commit message to include it, thanks!
> 
> > 
> > Why is this an RFC instead of just a normal patch which we can apply?
> 
> After doing the tests mentioned in the cover letter, I found Red Hat's
> network QE team has quite a rigorous test suite. But I needed to return the
> machine before having the time to learn about the test suite and run it by
> myself. So I mark it as an RFC before I borrow the machine again to run the
> test suite.

Interesting. Is this test suite based on a public project?

  reply	other threads:[~2021-06-23  4:55 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 13:48 [RFC 00/19] Improve the qlge driver based on drivers/staging/qlge/TODO Coiby Xu
2021-06-21 13:48 ` [RFC 01/19] staging: qlge: fix incorrect truesize accounting Coiby Xu
2021-06-21 14:10   ` Dan Carpenter
2021-06-21 14:10     ` Dan Carpenter
2021-06-22 11:36     ` Coiby Xu
2021-06-22 11:36       ` Coiby Xu
2021-06-23  4:55       ` Benjamin Poirier [this message]
2021-06-23  4:55         ` Benjamin Poirier
2021-06-24 11:47         ` Coiby Xu
2021-06-24 11:47           ` Coiby Xu
2021-06-28  0:14           ` Coiby Xu
2021-06-28  0:14             ` Coiby Xu
2021-06-21 13:48 ` [RFC 02/19] staging: qlge: change LARGE_BUFFER_MAX_SIZE to 4096 Coiby Xu
2021-06-21 13:48 ` [RFC 03/19] staging: qlge: alloc skb with only enough room for header when data is put in the fragments Coiby Xu
2021-06-21 13:48 ` [RFC 04/19] staging: qlge: add qlge_* prefix to avoid namespace clashes Coiby Xu
2021-06-22  7:55   ` Benjamin Poirier
2021-06-22  7:55     ` Benjamin Poirier
2021-06-24 11:34     ` Coiby Xu
2021-06-24 11:34       ` Coiby Xu
2021-06-21 13:48 ` [RFC 05/19] staging: qlge: rename rx to completion queue and seperate rx_ring from completion queue Coiby Xu
2021-06-21 13:48 ` [RFC 06/19] staging: qlge: disable flow control by default Coiby Xu
2021-06-22  7:49   ` Benjamin Poirier
2021-06-22  7:49     ` Benjamin Poirier
2021-06-24 11:33     ` Coiby Xu
2021-06-24 11:33       ` Coiby Xu
2021-06-21 13:48 ` [RFC 07/19] staging: qlge: remove the TODO item of unnecessary memset 0 Coiby Xu
2021-06-21 13:48 ` [RFC 08/19] staging: qlge: reorder members of qlge_adapter for optimization Coiby Xu
2021-06-21 13:48 ` [RFC 09/19] staging: qlge: remove the TODO item of reorder struct Coiby Xu
2021-06-21 13:48 ` [RFC 10/19] staging: qlge: remove the TODO item of avoid legacy/deprecated apis Coiby Xu
2021-06-21 13:48 ` [RFC 11/19] staging: qlge: the number of pages to contain a buffer queue is constant Coiby Xu
2021-06-21 13:48 ` [RFC 12/19] staging: qlge: rewrite do while loops as for loops in qlge_start_rx_ring Coiby Xu
2021-06-22  7:45   ` Benjamin Poirier
2021-06-22  7:45     ` Benjamin Poirier
2021-06-24 11:56     ` Coiby Xu
2021-06-24 11:56       ` Coiby Xu
2021-06-21 13:48 ` [RFC 13/19] staging: qlge: rewrite do while loop as for loop in qlge_sem_spinlock Coiby Xu
2021-06-22  7:20   ` Dan Carpenter
2021-06-22  7:20     ` Dan Carpenter
2021-06-24 11:22     ` Coiby Xu
2021-06-24 11:22       ` Coiby Xu
2021-06-30 10:58       ` Joe Perches
2021-06-30 10:58         ` Joe Perches
2021-06-30 23:33         ` Coiby Xu
2021-06-30 23:33           ` Coiby Xu
2021-07-01  4:35           ` Joe Perches
2021-07-01  4:35             ` Joe Perches
2021-07-02 23:56             ` Coiby Xu
2021-07-02 23:56               ` Coiby Xu
2021-06-21 13:48 ` [RFC 14/19] staging: qlge: rewrite do while loop as for loop in qlge_refill_bq Coiby Xu
2021-06-21 13:48 ` [RFC 15/19] staging: qlge: remove the TODO item about rewriting while loops as simple for loops Coiby Xu
2021-06-21 13:48 ` [RFC 16/19] staging: qlge: remove deadcode in qlge_build_rx_skb Coiby Xu
2021-06-22  7:29   ` Dan Carpenter
2021-06-22  7:29     ` Dan Carpenter
2021-06-24 11:25     ` Coiby Xu
2021-06-24 11:25       ` Coiby Xu
2021-06-24 12:49       ` Dan Carpenter
2021-06-24 12:49         ` Dan Carpenter
2021-06-27 10:53         ` Coiby Xu
2021-06-27 10:53           ` Coiby Xu
2021-06-28  6:46           ` Dan Carpenter
2021-06-28  6:46             ` Dan Carpenter
2021-06-29 13:35             ` Coiby Xu
2021-06-29 13:35               ` Coiby Xu
2021-06-29 14:22               ` Dan Carpenter
2021-06-29 14:22                 ` Dan Carpenter
2021-06-30 23:19                 ` Coiby Xu
2021-06-30 23:19                   ` Coiby Xu
2021-06-21 13:49 ` [RFC 17/19] staging: qlge: fix weird line wrapping Coiby Xu
2021-06-22  8:46   ` Dan Carpenter
2021-06-22  8:46     ` Dan Carpenter
2021-06-24 11:55     ` Coiby Xu
2021-06-24 11:55       ` Coiby Xu
2021-06-21 13:49 ` [RFC 18/19] staging: qlge: fix two indentation issues Coiby Xu
2021-06-21 13:49 ` [RFC 19/19] staging: qlge: remove TODO item of unnecessary runtime checks Coiby Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNK+s9Rm7OtL++YM@d3 \
    --to=benjamin.poirier@gmail.com \
    --cc=GR-Linux-NIC-Dev@marvell.com \
    --cc=coiby.xu@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=shung-hsi.yu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.