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