[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200923203530.lenv5jedwmtefwqu@soft-dev3.localdomain>
Date: Wed, 23 Sep 2020 22:35:30 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Y.b. Lu" <yangbo.lu@....com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
Claudiu Manoil <claudiu.manoil@....com>,
"alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
"andrew@...n.ch" <andrew@...n.ch>,
"vivien.didelot@...il.com" <vivien.didelot@...il.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"richardcochran@...il.com" <richardcochran@...il.com>
Subject: Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to
ocelot_port_add_txtstamp_skb
The 09/23/2020 20:22, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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.
Yeah, something like that I was thinking.
Also I am just thinking, not sure if it is correct but, can you return
NETDEV_TX_BUSY and not free the skb?
>
> 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
--
/Horatiu
Powered by blists - more mailing lists