lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drivers: net: xgene: fix: Out of order descriptor bytes read
From
From: Iyappan Subramanian <isubramanian@apm.com>
Date: Mon, 26 Jan 2015 13:12:23 -0800

>>> @@ -369,6 +369,8 @@ static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring,
>>> if (unlikely(xgene_enet_is_desc_slot_empty(raw_desc)))
>>> break;
>>>
>>> + /* read fpqnum field after dataaddr field */
>>> + smp_rmb();
>>> if (is_rx_desc(raw_desc))
>>> ret = xgene_enet_rx_frame(ring, raw_desc);
>>> else
>>
>> Reading your changelog, it looks like you need a plain rmb() here.
>
> rmb() translates into dsb, which in arm64 serializes everything
> including instructions and thus expensive compared to dmb.
>
> Do you see any issue with smp_rmb() (which translates into dmb) ?

smp_rmb() is not appropriate. You're not serializing accesses between
two cpus, you're serializing the cpu with the device.


\
 
 \ /
  Last update: 2015-01-27 00:01    [W:0.095 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site