[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200923.131707.1724242419810377273.davem@davemloft.net>
Date: Wed, 23 Sep 2020 13:17:07 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: horatiu.vultur@...rochip.com
Cc: vladimir.oltean@....com, netdev@...r.kernel.org, yangbo.lu@....com,
xiaoliang.yang_1@....com, UNGLinuxDriver@...rochip.com,
claudiu.manoil@....com, alexandre.belloni@...tlin.com,
andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
kuba@...nel.org, richardcochran@...il.com
Subject: Re: [PATCH net-next] net: mscc: ocelot: always pass skb clone to
ocelot_port_add_txtstamp_skb
From: Horatiu Vultur <horatiu.vultur@...rochip.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'.
Powered by blists - more mailing lists