From: dingtianhong@huawei.com (Ding Tianhong)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 4/6] net: hip04: Don't free the tx skb when the buffer is not ready for xmit
Date: Thu, 16 Apr 2015 14:26:21 +0800 [thread overview]
Message-ID: <552F560D.4070309@huawei.com> (raw)
In-Reply-To: <2218546.M1hzu1bzfh@wuerfel>
On 2015/4/15 22:19, Arnd Bergmann wrote:
> On Wednesday 15 April 2015 20:30:06 Ding Tianhong wrote:
>> @@ -489,6 +487,8 @@ static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>>
>> /* Ensure tx_head update visible to tx reclaim */
>> smp_wmb();
>> + count++;
>> + priv->tx_head = TX_NEXT(tx_head);
>>
>>
>
> Something is wrong here, the comment does not match the code any more, because
> the smp_wmb() won't actually make the tx_head update visible.
>
> Arnd
>
Yes, the smp_wmb() could only make sure the tx buffer was ready to xmit.
> .
>
WARNING: multiple messages have this Message-ID (diff)
From: Ding Tianhong <dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org
Subject: Re: [PATCH net-next 4/6] net: hip04: Don't free the tx skb when the buffer is not ready for xmit
Date: Thu, 16 Apr 2015 14:26:21 +0800 [thread overview]
Message-ID: <552F560D.4070309@huawei.com> (raw)
In-Reply-To: <2218546.M1hzu1bzfh@wuerfel>
On 2015/4/15 22:19, Arnd Bergmann wrote:
> On Wednesday 15 April 2015 20:30:06 Ding Tianhong wrote:
>> @@ -489,6 +487,8 @@ static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>>
>> /* Ensure tx_head update visible to tx reclaim */
>> smp_wmb();
>> + count++;
>> + priv->tx_head = TX_NEXT(tx_head);
>>
>>
>
> Something is wrong here, the comment does not match the code any more, because
> the smp_wmb() won't actually make the tx_head update visible.
>
> Arnd
>
Yes, the smp_wmb() could only make sure the tx buffer was ready to xmit.
> .
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Ding Tianhong <dingtianhong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
<eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
<zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
<joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Subject: Re: [PATCH net-next 4/6] net: hip04: Don't free the tx skb when the buffer is not ready for xmit
Date: Thu, 16 Apr 2015 14:26:21 +0800 [thread overview]
Message-ID: <552F560D.4070309@huawei.com> (raw)
In-Reply-To: <2218546.M1hzu1bzfh@wuerfel>
On 2015/4/15 22:19, Arnd Bergmann wrote:
> On Wednesday 15 April 2015 20:30:06 Ding Tianhong wrote:
>> @@ -489,6 +487,8 @@ static int hip04_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
>>
>> /* Ensure tx_head update visible to tx reclaim */
>> smp_wmb();
>> + count++;
>> + priv->tx_head = TX_NEXT(tx_head);
>>
>>
>
> Something is wrong here, the comment does not match the code any more, because
> the smp_wmb() won't actually make the tx_head update visible.
>
> Arnd
>
Yes, the smp_wmb() could only make sure the tx buffer was ready to xmit.
> .
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-04-16 6:26 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 12:30 [PATCH net-next 0/6] net: hip04: fix some problem for hip04 drivers Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` [PATCH net-next 1/6] net: hip04: Set more appropriate value for tx coalesce num Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:11 ` Arnd Bergmann
2015-04-15 14:11 ` Arnd Bergmann
2015-04-15 12:30 ` [PATCH net-next 2/6] net: hip04: use the big endian for tx and rx desc Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:13 ` Arnd Bergmann
2015-04-15 14:13 ` Arnd Bergmann
2015-04-16 6:25 ` Ding Tianhong
2015-04-16 6:25 ` Ding Tianhong
2015-04-16 6:25 ` Ding Tianhong
2015-04-15 12:30 ` [PATCH net-next 3/6] net: hip04: Solve the problem of the skb memory allocation failure Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:17 ` Arnd Bergmann
2015-04-15 14:17 ` Arnd Bergmann
2015-04-15 12:30 ` [PATCH net-next 4/6] net: hip04: Don't free the tx skb when the buffer is not ready for xmit Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:19 ` Arnd Bergmann
2015-04-15 14:19 ` Arnd Bergmann
2015-04-16 6:26 ` Ding Tianhong [this message]
2015-04-16 6:26 ` Ding Tianhong
2015-04-16 6:26 ` Ding Tianhong
2015-04-16 8:41 ` Arnd Bergmann
2015-04-16 8:41 ` Arnd Bergmann
2015-04-16 9:38 ` Ding Tianhong
2015-04-16 9:38 ` Ding Tianhong
2015-04-16 9:38 ` Ding Tianhong
2015-04-15 12:30 ` [PATCH net-next 5/6] net: hip04: remove the unnecessary check Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:14 ` Arnd Bergmann
2015-04-15 14:14 ` Arnd Bergmann
2015-04-15 12:30 ` [PATCH net-next 6/6] net: hip04: add ratelimit for rx/tx drops skb Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 12:30 ` Ding Tianhong
2015-04-15 14:20 ` Arnd Bergmann
2015-04-15 14:20 ` Arnd Bergmann
2015-04-15 14:25 ` [PATCH net-next 0/6] net: hip04: fix some problem for hip04 drivers Arnd Bergmann
2015-04-15 14:25 ` Arnd Bergmann
2015-04-16 6:28 ` Ding Tianhong
2015-04-16 6:28 ` Ding Tianhong
2015-04-16 6:28 ` Ding Tianhong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552F560D.4070309@huawei.com \
--to=dingtianhong@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.