[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5525DEEB.7020102@redhat.com>
Date: Wed, 08 Apr 2015 19:07:39 -0700
From: Alexander Duyck <alexander.h.duyck@...hat.com>
To: Amir Vadai <amirv@...lanox.com>,
"David S. Miller" <davem@...emloft.net>
CC: netdev@...r.kernel.org, Yevgeny Petrilin <yevgenyp@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Achiad Shochat <achiad@...lanox.com>,
Ido Shamay <idos@...lanox.com>
Subject: Re: [PATCH net-next 11/11] net/mlx5: Ethernet driver
On 04/08/2015 07:51 AM, Amir Vadai wrote:
> Signed-off-by: Amir Vadai <amirv@...lanox.com>
> --- /dev/null
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
> @@ -0,0 +1,518 @@
<snip>
> + struct mlx5e_params *new_params);
> +
> +static inline void mlx5e_tx_notify_hw(struct mlx5e_sq *sq,
> + struct mlx5e_tx_wqe *wqe)
> +{
> + /* ensure wqe is visible to device before updating doorbell record */
> + wmb();
> +
Could this be replaced with a dma_wmb() since it seems like you are just
doing two memory writes here between the wqe and *sq->wq.db.
> + *sq->wq.db = cpu_to_be32(sq->pc);
> +
> + /* ensure doorbell record is visible to device before ringing the
> + * doorbell */
> + wmb();
> +
> + mlx5_write64((__be32 *)&wqe->ctrl,
> + sq->uar_map + MLX5_BF_OFFSET + sq->bf_offset,
> + NULL);
> +
> + sq->bf_offset ^= sq->bf_buf_size;
> +}
> +
> +static inline void mlx5e_cq_arm(struct mlx5e_cq *cq)
> +{
> + struct mlx5_core_cq *mcq;
> +
> + mcq = &cq->mcq;
> + mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, NULL, cq->wq.cc);
> +}
> +
> +extern const struct ethtool_ops mlx5e_ethtool_ops;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists