DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wei, Dan" <dan.wei@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: "Xu, Rosen" <rosen.xu@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [DPDK v2] net/ipn3ke: modifications on AFU configurations
Date: Mon, 10 Jun 2019 06:27:50 +0000	[thread overview]
Message-ID: <35413AA7DC893F4FA6679F94DEE6B7E73C236E84@CDSMSX102.ccr.corp.intel.com> (raw)
In-Reply-To: <287a996b-77e6-f523-456b-c10745ad74dc@intel.com>

Thank you for your comments.

> > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c 
> > b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > index 9079b57..84eb0e9 100644
> > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > @@ -223,15 +223,25 @@
> >  				"LineSideMACType", &mac_type);
> >  	hw->retimer.mac_type = (int)mac_type;
> >  
> > +	/* After power on, wait until init done */
> > +	while (IPN3KE_READ_REG(hw, IPN3KE_INIT_DONE) != 0x3)
> > +		;
> 
> Isn't this dangerous? What do you think putting a limit to the loop?
> And what do you think creating a define for 0x3?
  I will add a timeout in the loop. I will create a macro for 0x3.

> <...>
> 
> > @@ -355,13 +354,13 @@ static inline uint32_t 
> > _ipn3ke_indrct_read(struct ipn3ke_hw *hw,
> >  
> >  	word_offset = (addr & 0x1FFFFFF) >> 2;
> >  	indirect_value = RCMD | word_offset << 32;
> > -	indirect_addrs = hw->hw_addr + (uint32_t)(UPL_BASE | 0x10);
> > +	indirect_addrs = hw->hw_addr + (uint32_t)(0x30);
> 
> Can you create a macro for 0x30 hardcoded value? And same for below hardcoded values.
  I will create macros.

> <...>
> 
> > @@ -500,6 +500,7 @@ static inline void _ipn3ke_indrct_write(struct ipn3ke_hw *hw,
> >  #define IPN3KE_CLF_RX_TEST                    (IPN3KE_CLASSIFY_OFFSET + 0x0400)
> >  
> >  #define IPN3KE_CLF_EM_VERSION       (IPN3KE_CLASSIFY_OFFSET + 0x40000 + 0x0000)
> > +#define IPN3KE_CLF_EM_SCRATCH       (IPN3KE_CLASSIFY_OFFSET + 0x40000 + 0x0004)
> 
> As far as I can see this macro is not used in this patch, why adding it?
   I will delete it.

      reply	other threads:[~2019-06-10  6:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 14:58 Dan Wei
2019-05-31  6:17 ` Xu, Rosen
2019-06-04  3:19   ` Wei, Dan
2019-06-11  2:33     ` Xu, Rosen
2019-06-06 15:13 ` Ferruh Yigit
2019-06-10  6:27   ` Wei, Dan [this message]

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=35413AA7DC893F4FA6679F94DEE6B7E73C236E84@CDSMSX102.ccr.corp.intel.com \
    --to=dan.wei@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=rosen.xu@intel.com \
    --cc=stable@dpdk.org \
    /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).