Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Y.b. Lu" <yangbo.lu@nxp.com>,
	Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
	"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>
Subject: Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb
Date: Wed, 23 Sep 2020 20:22:32 +0000	[thread overview]
Message-ID: <20200923202231.vr5ll2yu4gztqzwj@skbuf> (raw)
In-Reply-To: <20200923200800.t7y47fagvgffw4ya@soft-dev3.localdomain>

On Wed, Sep 23, 2020 at 10:08:00PM +0200, Horatiu Vultur wrote:
> The 09/23/2020 14:24, Vladimir Oltean wrote:
> > +               if (ocelot_port->ptp_cmd == IFH_REW_OP_TWO_STEP_PTP) {
> > +                       struct sk_buff *clone;
> > +
> > +                       clone = skb_clone_sk(skb);
> > +                       if (!clone) {
> > +                               kfree_skb(skb);
> > +                               return NETDEV_TX_OK;
>
> Why do you return NETDEV_TX_OK?
> Because the frame is not sent yet.

I suppose I _could_ increment the tx_dropped counters, if that's what
you mean.

I was also going to request David to let me send a v2, because I want to
replace the kfree_skb at the end of this function with a proper
consume_skb, so that this won't appear as a false positive in the drop
monitor.

Thanks,
-Vladimir

  parent reply	other threads:[~2020-09-23 20:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 11:24 [PATCH net-next] net: mscc: ocelot: always pass skb clone to ocelot_port_add_txtstamp_skb Vladimir Oltean
2020-09-23 20:08 ` Horatiu Vultur
2020-09-23 20:17   ` David Miller
2020-09-23 20:22   ` Vladimir Oltean [this message]
2020-09-23 20:35     ` Horatiu Vultur
2020-09-23 20:45       ` Vladimir Oltean
2020-09-23 21:46         ` Horatiu Vultur
2020-09-24  2:18 ` Richard Cochran
2020-09-25  2:48 ` David Miller

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=20200923202231.vr5ll2yu4gztqzwj@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=vivien.didelot@gmail.com \
    --cc=xiaoliang.yang_1@nxp.com \
    --cc=yangbo.lu@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox