lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALzJLG-wmrc3FmtE2PrD4r3w+7em0WCb3YmRD1J=nT2=VvHfFg@mail.gmail.com>
Date:	Sun, 12 Apr 2015 14:33:04 +0300
From:	Saeed Mahameed <saeedm@....mellanox.co.il>
To:	Alexander Duyck <alexander.h.duyck@...hat.com>
Cc:	Amir Vadai <amirv@...lanox.com>,
	"David S. Miller" <davem@...emloft.net>, 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 09/11] net/mlx5: Ethernet Datapath files

On Thu, Apr 9, 2015 at 5:01 AM, Alexander Duyck
<alexander.h.duyck@...hat.com> wrote:
> On 04/08/2015 07:51 AM, Amir Vadai wrote:
>>
>> Signed-off-by: Amir Vadai <amirv@...lanox.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.
Thanks, we will change it in V1
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ