> -----Original Message----- > From: Don Hiatt [mailto:don.hiatt@xxxxxxxxx] > Sent: Wednesday, October 04, 2017 5:15 PM > To: Parav Pandit <parav@xxxxxxxxxxxx>; Dasaratharaman Chandramouli > <dasaratharaman.chandramouli@xxxxxxxxx>; Doug Ledford > <dledford@xxxxxxxxxx> > Cc: linux-rdma <linux-rdma@xxxxxxxxxxxxxxx> > Subject: Re: [PATCH v4 rdma-next 17/18] IB/core: Define 'ib' and 'roce' > rdma_ah_attr types > > > > On 10/4/2017 2:24 PM, Parav Pandit wrote: > >> -----Original Message----- > >> From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma- > >> owner@xxxxxxxxxxxxxxx] On Behalf Of Dasaratharaman Chandramouli > >> Sent: Saturday, April 29, 2017 1:41 PM > >> To: Doug Ledford <dledford@xxxxxxxxxx> > >> Cc: linux-rdma <linux-rdma@xxxxxxxxxxxxxxx> > >> Subject: [PATCH v4 rdma-next 17/18] IB/core: Define 'ib' and 'roce' > >> rdma_ah_attr types > >> +/*Get AH type */ > >> +static inline enum rdma_ah_attr_type rdma_ah_find_type(struct > >> +ib_device > >> *dev, > >> + u32 port_num) > >> +{ > >> + if ((rdma_protocol_roce(dev, port_num)) || > >> + (rdma_protocol_iwarp(dev, port_num))) > >> + return RDMA_AH_ATTR_TYPE_ROCE; > > Check for iWarp to define AH attribute type as RoCE appears error to me. > > Taking quick look at i40iw and nes drivers appears to return -ENOSYS for > i40iw_create_ah(), nes_create_ah. > > Will you please submit a fix that avoids above iWarp check? > > > > > i40iw_port_immutable sets the RDMA_CORE_PORT_IWARP immutable flag, But when would someone create or initialize ah for iWarp port, given than create_ah is unsupported. AH type of RoCE for iWarp, doesn't sound correct. Is RoCE type of AH used on QP in iWarp that needs this check? > hence the check. Are you having an issue? No. I am refactoring some code and noticed this check. This check can wrongly detects RoCE AH on iwarp port, isn't it? ��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f