From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: Amir Vadai <amirv@mellanox.com>, "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Yevgeny Petrilin <yevgenyp@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Achiad Shochat <achiad@mellanox.com>,
Ido Shamay <idos@mellanox.com>
Subject: Re: [PATCH net-next 09/11] net/mlx5: Ethernet Datapath files
Date: Wed, 08 Apr 2015 19:01:22 -0700 [thread overview]
Message-ID: <5525DD72.9040906@redhat.com> (raw)
In-Reply-To: <1428504685-8945-10-git-send-email-amirv@mellanox.com>
On 04/08/2015 07:51 AM, Amir Vadai wrote:
> Signed-off-by: Amir Vadai <amirv@mellanox.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 249 +++++++++++++++
> drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 350 ++++++++++++++++++++++
> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 107 +++++++
> 3 files changed, 706 insertions(+)
> create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
> create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
>
<snip>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
> new file mode 100644
> index 0000000..088bc42
> --- /dev/null
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
> @@ -0,0 +1,107 @@
> +/*
> + * Copyright (c) 2015, Mellanox Technologies. All rights reserved.
> + *
> + * This software is available to you under a choice of one of two
> + * licenses. You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available from the file
> + * COPYING in the main directory of this source tree, or the
> + * OpenIB.org BSD license below:
> + *
> + * Redistribution and use in source and binary forms, with or
> + * without modification, are permitted provided that the following
> + * conditions are met:
> + *
> + * - Redistributions of source code must retain the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer.
> + *
> + * - Redistributions in binary form must reproduce the above
> + * copyright notice, this list of conditions and the following
> + * disclaimer in the documentation and/or other materials
> + * provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + */
> +
> +#include "en.h"
> +
> +struct mlx5_cqe64 *mlx5e_get_cqe(struct mlx5e_cq *cq)
> +{
> + struct mlx5_cqwq *wq = &cq->wq;
> + u32 ci = mlx5_cqwq_get_ci(wq);
> + struct mlx5_cqe64 *cqe = mlx5_cqwq_get_wqe(wq, ci);
> + int cqe_ownership_bit = cqe->op_own & MLX5_CQE_OWNER_MASK;
> + int sw_ownership_val = mlx5_cqwq_get_wrap_cnt(wq) & 1;
> +
> + if (cqe_ownership_bit != sw_ownership_val)
> + return NULL;
> +
> + mlx5_cqwq_pop(wq);
> +
> + /* ensure cqe content is read after cqe ownership bit */
> + rmb();
> +
> + return cqe;
> +}
> +
I'm pretty sure this rmb can be a dma_rmb.
next prev parent reply other threads:[~2015-04-09 2:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 14:51 [PATCH net-next 00/11] net/mlx5: ConnectX-4 100G Ethernet driver Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 01/11] net/mlx5_core: Set irq affinity hints Amir Vadai
2015-04-10 8:27 ` Ido Shamay
2015-04-12 11:15 ` Saeed Mahameed
2015-04-08 14:51 ` [PATCH net-next 02/11] net/mlx5_core: Add EQ renaming mechanism Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 03/11] net/mlx5_core: Virtually extend work/completion queue buffers by one page Amir Vadai
2015-04-08 16:25 ` David Miller
2015-04-08 17:44 ` Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 04/11] net/mlx5_core: HW data structs/types definitions preparation for mlx5 ehternet driver Amir Vadai
2015-04-08 16:46 ` Joe Perches
2015-04-12 15:54 ` Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 05/11] net/mlx5_core/ib: New device capabilities handling Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 06/11] net/mlx5_core: Implement get and set functions of ptys register fields Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 07/11] net/mlx5_core: Implement get/set port status Amir Vadai
2015-04-08 18:26 ` Sergei Shtylyov
2015-04-08 18:38 ` Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 08/11] net/mlx5_core: Modify CQ moderation parameters Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 09/11] net/mlx5: Ethernet Datapath files Amir Vadai
2015-04-09 2:01 ` Alexander Duyck [this message]
2015-04-12 11:33 ` Saeed Mahameed
2015-04-12 11:52 ` Ido Shamay
2015-04-08 14:51 ` [PATCH net-next 10/11] net/mlx5: Ethernet resources handling Amir Vadai
2015-04-08 14:51 ` [PATCH net-next 11/11] net/mlx5: Ethernet driver Amir Vadai
2015-04-08 15:57 ` Eric Dumazet
2015-04-09 2:07 ` Alexander Duyck
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=5525DD72.9040906@redhat.com \
--to=alexander.h.duyck@redhat.com \
--cc=achiad@mellanox.com \
--cc=amirv@mellanox.com \
--cc=davem@davemloft.net \
--cc=idos@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=yevgenyp@mellanox.com \
/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.