mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Marek Vasut <marex@denx.de>, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	mkl@pengutronix.de, kernel@pengutronix.de,
	David Jander <david@protonic.nl>,
	Jakub Kicinski <kuba@kernel.org>,
	Christian Herber <christian.herber@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH v5 1/2] ethtool: provide UAPI for PHY master/slave configuration.
Date: Mon, 4 May 2020 15:35:35 +0200	[thread overview]
Message-ID: <20200504133535.GC8237@lion.mk-sys.cz> (raw)
In-Reply-To: <20200504085556.rzkvn47q2k5iqyap@pengutronix.de>

On Mon, May 04, 2020 at 10:55:56AM +0200, Oleksij Rempel wrote:
> On Mon, May 04, 2020 at 10:37:34AM +0200, Michal Kubecek wrote:
> > On Mon, May 04, 2020 at 10:04:17AM +0200, Oleksij Rempel wrote:
> > > @Michal,
> > > 
> > > i noticed that linkmodes_fill_reply() some times get not enough
> > > tailroom.
> > > if data->peer_empty == 0
> > > linkmodes_reply_size() size: 476
> > > linkmodes_fill_reply() skb tailroom: 724
> > > 
> > > 
> > > if data->peer_empty == 1
> > > linkmodes_reply_size() size: 216                                      
> > > linkmodes_fill_reply() skb tailroom: 212
> > > 
> > > In the last case i won't be able to attach master_lave state and cfg
> > > fields.
> > > 
> > > It looks like this issue was not introduced by my patches. May be you
> > > have idea, what is missing?
> > 
> > It's my mistake, I'm just not sure why I never ran into this while
> > testing. Please try the patch below.
> 
> thx! it works now:
> [   82.754019] linkmodes_reply_size:103 size: 216
> [   82.758523] linkmodes_fill_reply:117 skb tailroom: 724
> 
> [  126.781892] linkmodes_reply_size:103 size: 476
> [  126.786464] linkmodes_fill_reply:117 skb tailroom: 724

Thank you. It seems so far the natural skb padding was always sufficient
to hide the broken calculation. Some time ago I had a debugging printk
in place which checked calculated an actual size but that was with an
older version of the series and the code has been rewritten few times
before it reached mainline.

I'll run some tests with additional tracing of estimated and actual
message size and if I don't find other problem, I'll submit the fix.

Michal

  reply	other threads:[~2020-05-04 13:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  7:12 [PATCH net-next v4 0/2] provide support " Oleksij Rempel
2020-05-04  7:12 ` [PATCH v5 1/2] ethtool: provide UAPI " Oleksij Rempel
2020-05-04  8:04   ` Oleksij Rempel
2020-05-04  8:37     ` Michal Kubecek
2020-05-04  8:55       ` Oleksij Rempel
2020-05-04 13:35         ` Michal Kubecek [this message]
2020-05-04  9:10   ` Michal Kubecek
2020-05-04 10:10     ` Oleksij Rempel
2020-05-04 13:29       ` Michal Kubecek
2020-05-04  7:12 ` [PATCH v5 2/2] net: phy: tja11xx: add support for master-slave configuration Oleksij Rempel

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=20200504133535.GC8237@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=christian.herber@nxp.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=david@protonic.nl \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®