[dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning
Kevin Traynor
ktraynor at redhat.com
Mon Sep 27 12:37:48 CEST 2021
Hi,
On 27/09/2021 10:30, Zhang, RobinX wrote:
> Hi, Beilei
>
>> -----Original Message-----
>> From: Xing, Beilei <beilei.xing at intel.com>
>> Sent: Monday, September 27, 2021 5:18 PM
>> To: Zhang, RobinX <robinx.zhang at intel.com>; dev at dpdk.org
>> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Zhang, Helin
>> <helin.zhang at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>;
>> remy.horton at intel.com; jijiang.liu at intel.com; jing.d.chen at intel.com; Zhu,
>> Heqing <heqing.zhu at intel.com>; Liang, Cunming
>> <cunming.liang at intel.com>; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Zhang,
>> Roy Fan <roy.fan.zhang at intel.com>; Chilikin, Andrey
>> <andrey.chilikin at intel.com>; echaudro at redhat.com; Guo, Junfeng
>> <junfeng.guo at intel.com>; Yang, SteveX <stevex.yang at intel.com>
>> Subject: RE: [PATCH v4 18/18] net/i40e: fix redefinition warning
>>
>>
>>
>>> -----Original Message-----
>>> From: Zhang, RobinX <robinx.zhang at intel.com>
>>> Sent: Monday, September 6, 2021 10:03 AM
>>> To: dev at dpdk.org
>>> Cc: Xing, Beilei <beilei.xing at intel.com>; Zhang, Qi Z
>>> <qi.z.zhang at intel.com>; Zhang, Helin <helin.zhang at intel.com>; Wu,
>>> Jingjing <jingjing.wu at intel.com>; remy.horton at intel.com;
>>> jijiang.liu at intel.com; jing.d.chen at intel.com; Zhu, Heqing
>>> <heqing.zhu at intel.com>; Liang, Cunming <cunming.liang at intel.com>; Lu,
>>> Wenzhuo <wenzhuo.lu at intel.com>; Zhang, Roy Fan
>>> <roy.fan.zhang at intel.com>; Chilikin, Andrey
>>> <andrey.chilikin at intel.com>; echaudro at redhat.com; Guo, Junfeng
>>> <junfeng.guo at intel.com>; Yang, SteveX <stevex.yang at intel.com>; Zhang,
>>> RobinX <robinx.zhang at intel.com>
>>> Subject: [PATCH v4 18/18] net/i40e: fix redefinition warning
>>>
>>> After update i40e share code, there will be a redefinition compile warning.
>>> This patch fix the situation by remove duplicate definition in
>>> i40e_ethdev.c
>>>
>>> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait")
>> Need to cc stable?
>
> This patch is dependent on share code, so cannot cc stable.
>
I don't think the original definition should be the fixes commit, unless
it was incorrect before these patches.
This warning was introduced by the redefining in patch 13/18. It would
be better to fix 13/18 to not introduce the warning, rather than
introduce a warning and fix it at the end of the series.
>>
>>>
>>> Signed-off-by: Robin Zhang <robinx.zhang at intel.com>
>>> ---
>>> drivers/net/i40e/i40e_ethdev.c | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/i40e/i40e_ethdev.c
>>> b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..4fc44dc5e2 100644
>>> --- a/drivers/net/i40e/i40e_ethdev.c
>>> +++ b/drivers/net/i40e/i40e_ethdev.c
>>> @@ -2886,7 +2886,6 @@ static __rte_always_inline void
>>> update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) {
>>> /* Link status registers and values*/
>>> -#define I40E_PRTMAC_LINKSTA 0x001E2420
>>> #define I40E_REG_LINK_UP 0x40000080
>>> #define I40E_PRTMAC_MACC 0x001E24E0
>>> #define I40E_REG_MACC_25GB 0x00020000
>>> @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct
>>> rte_eth_link *link)
>>> uint32_t link_speed;
>>> uint32_t reg_val;
>>>
>>> - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA);
>>> + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0));
>>> link_speed = reg_val & I40E_REG_SPEED_MASK;
>>> reg_val &= I40E_REG_LINK_UP;
>>> link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0;
>>> --
>>> 2.25.1
>
More information about the dev
mailing list