> -----Original Message-----
> From: Zhang, RobinX <robinx.zh...@intel.com>
> Sent: Monday, September 6, 2021 10:03 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.x...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>;
> Zhang, Helin <helin.zh...@intel.com>; Wu, Jingjing <jingjing...@intel.com>;
> remy.hor...@intel.com; jijiang....@intel.com; jing.d.c...@intel.com; Zhu,
> Heqing <heqing....@intel.com>; Liang, Cunming
> <cunming.li...@intel.com>; Lu, Wenzhuo <wenzhuo...@intel.com>; Zhang,
> Roy Fan <roy.fan.zh...@intel.com>; Chilikin, Andrey
> <andrey.chili...@intel.com>; echau...@redhat.com; Guo, Junfeng
> <junfeng....@intel.com>; Yang, SteveX <stevex.y...@intel.com>; Zhang,
> RobinX <robinx.zh...@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?
>
> Signed-off-by: Robin Zhang <robinx.zh...@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