From: Horatiu Vultur <horatiu.vul...@microchip.com>
Date: Wed, 23 Sep 2020 22:08:00 +0200

> The 09/23/2020 14:24, Vladimir Oltean wrote:
>> @@ -345,7 +344,23 @@ static int ocelot_port_xmit(struct sk_buff *skb, struct 
>> net_device *dev)
>>         info.vid = skb_vlan_tag_get(skb);
>> 
>>         /* Check if timestamping is needed */
>> -       do_tstamp = (ocelot_port_add_txtstamp_skb(ocelot_port, skb) == 0);
>> +       if (ocelot->ptp && (shinfo->tx_flags & SKBTX_HW_TSTAMP)) {
>> +               info.rew_op = ocelot_port->ptp_cmd;
>> +
>> +               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.

Returning anything other than NETDEV_TX_OK will cause the networking stack
to try and requeue 'skb'.

Reply via email to