Hi > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, June 28, 2019 01:07 > To: Li, Xiaoyun <xiaoyun...@intel.com>; Wiles, Keith <keith.wi...@intel.com>; > Liang, Cunming <cunming.li...@intel.com>; Maslekar, Omkar > <omkar.masle...@intel.com> > Cc: dev@dpdk.org > Subject: RE: [PATCH v8 2/6] raw/ntb: add intel ntb support > > Few minor comments. > > > + case XEON_PPD_CONN_TRANSPARENT: > > + case XEON_PPD_CONN_RP: > > + NTB_LOG(ERR, "Not supported conn topo. Please use B2B."); > > + return -EINVAL; > > Do We need "default:" ? Yes. Sure. Thx.
> > + } > > + > > + /* Reserve the last 2 spad registers for users. */ > > + for (i = 0; i < NTB_SPAD_USER_MAX_NUM; i++) > > + hw->spad_user_list[i] = hw->spad_cnt; > > + hw->spad_user_list[0] = hw->spad_cnt - 2; > > + hw->spad_user_list[1] = hw->spad_cnt - 1; > > How about: > hw->spad_user_list[0] = hw->spad_cnt - 2; spad_user_list[1] = > hw->hw->spad_cnt - 1; > for (i = 2; i < NTB_SPAD_USER_MAX_NUM; i++) > hw->spad_user_list[i] = hw->spad_cnt; > I think this way is more straightforward in case that reserve more spad registers for users in the future.