From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Xuanziyang "(William," Chip Application Design Logic and
Hardware Development Dept IT_Products & "Solutions)"
<xuanziyang2@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Wangxiaoyun (Cloud,
Network Chip Application Development Dept)"
<cloud.wangxiaoyun@huawei.com>,
zhouguoyang <zhouguoyang@huawei.com>,
Shahar Belkar <shahar.belkar@huawei.com>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
Luoxianjun <luoxianjun@huawei.com>
Subject: Re: [dpdk-dev] [PATCH v4 07/11] net/hinic/base: add various headers
Date: Fri, 14 Jun 2019 16:37:47 +0100 [thread overview]
Message-ID: <f78f9f3c-3d23-7f3a-5478-2d9a23c9290f@intel.com> (raw)
In-Reply-To: <EA3B33EA29B44042A5337C4DC59AF4505EEE4367@dggeml512-mbx.china.huawei.com>
On 6/12/2019 3:24 PM, Xuanziyang (William, Chip Application Design Logic and
Hardware Development Dept IT_Products & Solutions) wrote:
>
>> On 6/6/2019 12:06 PM, Ziyang Xuan wrote:
>>> Add various headers that define mgmt commands, cmdq commands, rx
>> data
>>> structures, tx data structures and basic defines for use in the code.
>>>
>>> Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
>>
>> <...>
>>
>>> +#define PMD_DRV_LOG(level, fmt, args...) \
>>> + rte_log(RTE_LOG_ ## level, hinic_logtype, \
>>> + HINIC_DRIVER_NAME": " fmt "\n", ##args)
>>> +
>>> +#define HINIC_ASSERT_EN
>>> +
>>> +#ifdef HINIC_ASSERT_EN
>>> +#define HINIC_ASSERT(exp) \
>>> + do { \
>>> + if (!(exp)) { \
>>> + rte_panic("line%d\tassert \"" #exp "\" failed\n", \
>>> + __LINE__); \
>>> + } \
>>> + } while (0)
>>> +#else
>>> +#define HINIC_ASSERT(exp) do {} while (0)
>>> +#endif
>>
>> So you are enabling asserting by default? Which can cause "rte_panic()" ?
>>
>> Please make sure asserting is disabled by default, and please tie this to the
>> "CONFIG_RTE_ENABLE_ASSERT" config option. So it that option is disabled
>> hinic also should disable the assertions.
>
> I checked the places where use rte_panic, most of them can use code logic to guarantee correctness. And I have referenced other PMDs like mlx5, they use
> rte_panic directly but use custom encapsulation, so I delete custom encapsulation above and the most rte_panic usage, and use directly like mlx5.
>
> Is it OK?
>
Also does it make enable 'HINIC_ASSERT' when global 'CONFIG_RTE_ENABLE_ASSERT'
config enabled?
next prev parent reply other threads:[~2019-06-14 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 14:24 Xuanziyang (William, Chip Application Design Logic and Hardware Development Dept IT_Products & Solutions)
2019-06-14 15:37 ` Ferruh Yigit [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-06-06 11:04 [dpdk-dev] [PATCH v4 00/11] A new net PMD - hinic Ziyang Xuan
2019-06-06 11:17 ` [dpdk-dev] [PATCH v4 07/11] net/hinic/base: add various headers Ziyang Xuan
2019-06-06 11:06 ` Ziyang Xuan
2019-06-11 16:04 ` Ferruh Yigit
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=f78f9f3c-3d23-7f3a-5478-2d9a23c9290f@intel.com \
--to=ferruh.yigit@intel.com \
--cc=cloud.wangxiaoyun@huawei.com \
--cc=dev@dpdk.org \
--cc=luoxianjun@huawei.com \
--cc=shahar.belkar@huawei.com \
--cc=stephen@networkplumber.org \
--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).