Re: [PATCH v4 17/17] net: ena: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread okaya
On 2018-03-25 08:06, Belgazal, Netanel wrote: I think you should either add a parameter to ena_com_write_sq_doorbell() or add ena_com_write_sq_doorbell_rel(). Right now, you have unused function. That is true. I got rid of ena_com_write_sq_doorbell_rel. On 3/20/18, 4:43 AM, "Sinan Kaya" wr

Re: [PATCH v4 17/17] net: ena: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Belgazal, Netanel
I think you should either add a parameter to ena_com_write_sq_doorbell() or add ena_com_write_sq_doorbell_rel(). Right now, you have unused function. On 3/20/18, 4:43 AM, "Sinan Kaya" wrote: Code includes barrier() followed by writel(). writel() already has a barrier on some archit

[PATCH v4 17/17] net: ena: Eliminate duplicate barriers on weakly-ordered archs

2018-03-19 Thread Sinan Kaya
Code includes barrier() followed by writel(). writel() already has a barrier on some architectures like arm64. This ends up CPU observing two barriers back to back before executing the register write. Create a new wrapper function with relaxed write operator. Use the new wrapper when a write is f