From: Stephen Hemminger <stephen@networkplumber.org>
To: Ziyang Xuan <xuanziyang2@huawei.com>
Cc: <dev@dpdk.org>, <ferruh.yigit@intel.com>,
<cloud.wangxiaoyun@huawei.com>, <zhouguoyang@huawei.com>,
<shahar.belkar@huawei.com>, <luoxianjun@huawei.com>
Subject: Re: [dpdk-dev] [PATCH v2 08/11] net/hinic: add hinic PMD build and doc files
Date: Tue, 28 May 2019 21:59:23 -0700 [thread overview]
Message-ID: <20190528215923.6e2a5a9f@hermes.lan> (raw)
In-Reply-To: <185ce730f156c964c84344a4173882bdbbdd8509.1559100649.git.xuanziyang2@huawei.com>
On Wed, 29 May 2019 11:50:36 +0800
Ziyang Xuan <xuanziyang2@huawei.com> wrote:
> +Huawei hinic
> +M: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
> +M: Ziyang Xuan <xuanziyang2@huawei.com>
> +M: Guoyang Zhou <zhouguoyang@huawei.com>
> +M: Rami Rosen <rami.rosen@huawei.com>
You should remove Rami, he will be missed.
> diff --git a/drivers/net/hinic/base/hinic_logs.c b/drivers/net/hinic/base/hinic_logs.c
> new file mode 100644
> index 000000000..1e9b5ad92
> --- /dev/null
> +++ b/drivers/net/hinic/base/hinic_logs.c
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017 Huawei Technologies Co., Ltd
> + */
> +
> +
> +#include "hinic_logs.h"
> +
> +int hinic_logtype;
> +
> +RTE_INIT(hinic_init_log)
> +{
> + hinic_logtype = rte_log_register("pmd.net.hinic");
> + if (hinic_logtype >= 0)
> + rte_log_set_level(hinic_logtype, RTE_LOG_INFO);
> +}
> +
You could just put this in some other file
> diff --git a/drivers/net/hinic/base/hinic_logs.h b/drivers/net/hinic/base/hinic_logs.h
> new file mode 100644
> index 000000000..ed84a37a6
> --- /dev/null
> +++ b/drivers/net/hinic/base/hinic_logs.h
> @@ -0,0 +1,31 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2017 Huawei Technologies Co., Ltd
> + */
> +
> +#ifndef _HINIC_LOGS_H_
> +#define _HINIC_LOGS_H_
> +
> +#ifdef __cplusplus
> +#if __cplusplus
> +extern "C"{
> +#endif
> +#endif /* __cplusplus */
> +#include <rte_log.h>
Why all the C++ guards, this is a private file.
> +error_cflags = ['-Wno-unused-value',
> + '-Wno-unused-but-set-variable',
> + '-Wno-unused-variable',
> +]
Please fix these errors instead of masking them
> +/**
> + * Atomically writes the link status information into global
> + * struct rte_eth_dev.
> + */
> +int hinic_dev_atomic_write_link_status(struct rte_eth_dev *dev,
> + struct rte_eth_link *link)
> +{
> + struct rte_eth_link *dst = &dev->data->dev_link;
> + struct rte_eth_link *src = link;
> +
> + if (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst,
> + *(uint64_t *)src) == 0)
> + return HINIC_ERROR;
> +
> + return HINIC_OK;
> +}
There already is code in rte_ethdev in current versions of DPDK to do this.
next prev parent reply other threads:[~2019-05-29 4:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 3:45 [dpdk-dev] [PATCH v2 00/11] A new net PMD - hinic Ziyang Xuan
2019-05-29 3:46 ` [dpdk-dev] [PATCH v2 01/11] net/hinic/base: add registers for Huawei Hi1822 NIC Ziyang Xuan
2019-05-29 3:48 ` [dpdk-dev] [PATCH v2 02/11] net/hinic/base: add command channels code Ziyang Xuan
2019-05-29 3:49 ` [dpdk-dev] [PATCH v2 03/11] net/hinic/base: add mgmt module interactive code Ziyang Xuan
2019-05-29 3:49 ` [dpdk-dev] [PATCH v2 04/11] net/hinic/base: add code about hardware operation Ziyang Xuan
2019-05-29 3:49 ` [dpdk-dev] [PATCH v2 05/11] net/hinic/base: add eqs and context code Ziyang Xuan
2019-05-29 3:50 ` [dpdk-dev] [PATCH v2 06/11] net/hinic/base: add code for nic business Ziyang Xuan
2019-05-29 3:50 ` [dpdk-dev] [PATCH v2 07/11] net/hinic/base: add various headers Ziyang Xuan
2019-05-29 3:50 ` [dpdk-dev] [PATCH v2 08/11] net/hinic: add hinic PMD build and doc files Ziyang Xuan
2019-05-29 4:59 ` Stephen Hemminger [this message]
2019-05-29 3:50 ` [dpdk-dev] [PATCH v2 09/11] net/hinic: add RX module Ziyang Xuan
2019-05-29 3:51 ` [dpdk-dev] [PATCH v2 10/11] net/hinic: add TX module Ziyang Xuan
2019-05-29 3:51 ` [dpdk-dev] [PATCH v2 11/11] net/hinic: add support for basic device operations Ziyang Xuan
2019-05-30 1:54 [dpdk-dev] [PATCH v2 08/11] net/hinic: add hinic PMD build and doc files Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)
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=20190528215923.6e2a5a9f@hermes.lan \
--to=stephen@networkplumber.org \
--cc=cloud.wangxiaoyun@huawei.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=luoxianjun@huawei.com \
--cc=shahar.belkar@huawei.com \
--cc=xuanziyang2@huawei.com \
--cc=zhouguoyang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).