[dpdk-dev] [PATCH v4 1/3] ethdev: fix adding invalid MAC addr

Lu, Wenzhuo wenzhuo.lu at intel.com
Tue May 2 03:21:32 CEST 2017


Hi Wei,


> -----Original Message-----
> From: Dai, Wei
> Sent: Saturday, April 29, 2017 2:09 PM
> To: Lu, Wenzhuo; thomas.monjalon at 6wind.com; harish.patil at cavium.com;
> rasesh.mody at cavium.com; stephen.hurd at broadcom.com;
> ajit.khaparde at broadcom.com; Zhang, Helin; Ananyev, Konstantin; Wu,
> Jingjing; Chen, Jing D; adrien.mazarguil at 6wind.com;
> nelio.laranjeiro at 6wind.com; Richardson, Bruce;
> yuanhan.liu at linux.intel.com; maxime.coquelin at redhat.com
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: RE: [PATCH v4 1/3] ethdev: fix adding invalid MAC addr
> 
> HI, Wenzhuo
> 
> > >
> > >  int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int
> > > wait_to_complete) diff --git a/drivers/net/e1000/base/e1000_api.c
> > > b/drivers/net/e1000/base/e1000_api.c
> > > index f7cf83b..dcb53f7 100644
> > > --- a/drivers/net/e1000/base/e1000_api.c
> > > +++ b/drivers/net/e1000/base/e1000_api.c
> > > @@ -855,7 +855,7 @@ int e1000_rar_set(struct e1000_hw *hw, u8 *addr,
> > > u32 index)
> > >  	if (hw->mac.ops.rar_set)
> > >  		return hw->mac.ops.rar_set(hw, addr, index);
> > >
> > > -	return E1000_SUCCESS;
> > > +	return E1000_ERR_NO_SPACE;
> > >  }
> > NACK here. Normally we try to avoid changing base code. And I don't
> > think the change is necessary.
> 
> If this code is not changed, the code in ethdev may get wrong return value
> and assume the failed MAC addr is added.
> Anyway, we can ask the base code to be revised by the associated team.
' hw->mac.ops.rar_set ' cannot be NULL. That's why I think this change is not necessary.


More information about the dev mailing list