Messages in this thread | | | Date | Mon, 26 Jan 2015 14:34:02 -0800 (PST) | Subject | Re: [PATCH] drivers: net: xgene: fix: Out of order descriptor bytes read | From | David Miller <> |
| |
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.
| |