On 2020/9/2 18:16, Eric Dumazet wrote:
>
>
> On 9/2/20 2:41 AM, Luo bin wrote:
>> When calling hinic_close in hinic_set_channels, netif_carrier_off
>> and netif_tx_disable are excuted, and TX host resources are freed
>> after that. Core may call hinic_xmit_frame to send pkt after
>> netif_tx_disa
On 2020/9/3 3:52, David Miller wrote:
> From: Luo bin
> Date: Wed, 2 Sep 2020 17:41:45 +0800
>
>> @@ -531,6 +531,11 @@ netdev_tx_t hinic_xmit_frame(struct sk_buff *skb,
>> struct net_device *netdev)
>> struct hinic_txq *txq;
>> struct hinic_qp *qp;
>>
>> +if (unlikely(!netif_carr
From: Luo bin
Date: Wed, 2 Sep 2020 17:41:45 +0800
> @@ -531,6 +531,11 @@ netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct
> net_device *netdev)
> struct hinic_txq *txq;
> struct hinic_qp *qp;
>
> + if (unlikely(!netif_carrier_ok(netdev))) {
> + dev_kfree_sk
On 9/2/20 2:41 AM, Luo bin wrote:
> When calling hinic_close in hinic_set_channels, netif_carrier_off
> and netif_tx_disable are excuted, and TX host resources are freed
> after that. Core may call hinic_xmit_frame to send pkt after
> netif_tx_disable within a short time, so we should judge whet
When calling hinic_close in hinic_set_channels, netif_carrier_off
and netif_tx_disable are excuted, and TX host resources are freed
after that. Core may call hinic_xmit_frame to send pkt after
netif_tx_disable within a short time, so we should judge whether
carrier is on before sending pkt otherwis