Re: [PATCH V1 15/16] i40iw: add entry in rdma_netlink

2015-12-24 Thread Or Gerlitz

On 12/24/2015 9:05 AM, Faisal Latif wrote:


>Why the iwarp port mapper implementationhas to be repeated in each
>driver? can you join your code in a common place and avoid the duplication?
>
>root@r-dcs58 hw]# git grep RDMA_NL_ nes
>nes/nes.c:  [RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
>nes/nes.c:  [RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
>nes/nes.c:  [RDMA_NL_IWPM_QUERY_MAPPING] = {.dump =
>iwpm_add_and_query_mapping_cb},
>nes/nes.c:  [RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
>nes/nes.c:  [RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
>nes/nes.c:  [RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
>nes/nes.c:  [RDMA_NL_IWPM_MAPINFO_NUM] = {.dump =
>iwpm_ack_mapping_info_cb}
>nes/nes.c:  if (ibnl_add_client(RDMA_NL_NES, RDMA_NL_IWPM_NUM_OPS,
>nes_nl_cb_table))
>nes/nes.c:  ret = iwpm_init(RDMA_NL_NES);
>nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
>nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
>nes/nes.c:  iwpm_exit(RDMA_NL_NES);
>nes/nes_cm.c: _sockaddr, RDMA_NL_NES);
>nes/nes_cm.c:   return iwpm_remove_mapping(_sockaddr, RDMA_NL_NES);
>nes/nes_cm.c:   _addr, RDMA_NL_NES);
>nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg,
>RDMA_NL_NES);
>nes/nes_cm.c:   iwpm_err = iwpm_add_mapping(_msg,
>RDMA_NL_NES);
>nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_NES);
>nes/nes_cm.c:   iwpm_err = iwpm_add_and_query_mapping(_msg,
>RDMA_NL_NES);
>



i40iw iwarp driver registers with port mapper and uses its services. Beside 
that it is not the scope of the patch series.



You are asked a question by reviewer and your reply is

(1) YES, I did C & P from driver X to my driver

(2) explaining why C is right goes beyond the scope of reviewing my driver

This isn't how things work in upstream.

If needed, talk to the upstream Intel networking folks, they can assist 
you catching up on upstream practices.


Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V1 15/16] i40iw: add entry in rdma_netlink

2015-12-23 Thread Or Gerlitz

On 12/22/2015 1:13 AM, Faisal Latif wrote:

Add entry for port mapper services.

Signed-off-by: Faisal Latif 
---
  include/uapi/rdma/rdma_netlink.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index c19a5dc..4fa418d 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -8,6 +8,7 @@ enum {
RDMA_NL_NES,
RDMA_NL_C4IW,
RDMA_NL_LS, /* RDMA Local Services */
+   RDMA_NL_I40IW,
RDMA_NL_NUM_CLIENTS
  };
  
Do you use this value in down-stream patches of the series? if yes, 
change the order to have this and other IB core changes before the code 
that use that.


Why the iwarp port mapper implementationhas to be repeated in each 
driver? can you join your code in a common place and avoid the duplication?


root@r-dcs58 hw]# git grep RDMA_NL_ nes
nes/nes.c:  [RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
nes/nes.c:  [RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
nes/nes.c:  [RDMA_NL_IWPM_QUERY_MAPPING] = {.dump = 
iwpm_add_and_query_mapping_cb},

nes/nes.c:  [RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
nes/nes.c:  [RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
nes/nes.c:  [RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
nes/nes.c:  [RDMA_NL_IWPM_MAPINFO_NUM] = {.dump = 
iwpm_ack_mapping_info_cb}
nes/nes.c:  if (ibnl_add_client(RDMA_NL_NES, RDMA_NL_IWPM_NUM_OPS, 
nes_nl_cb_table))

nes/nes.c:  ret = iwpm_init(RDMA_NL_NES);
nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
nes/nes.c:  iwpm_exit(RDMA_NL_NES);
nes/nes_cm.c: _sockaddr, RDMA_NL_NES);
nes/nes_cm.c:   return iwpm_remove_mapping(_sockaddr, RDMA_NL_NES);
nes/nes_cm.c:   _addr, RDMA_NL_NES);
nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg, 
RDMA_NL_NES);
nes/nes_cm.c:   iwpm_err = iwpm_add_mapping(_msg, 
RDMA_NL_NES);

nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_NES);
nes/nes_cm.c:   iwpm_err = iwpm_add_and_query_mapping(_msg, 
RDMA_NL_NES);


[root@r-dcs58 hw]# git grep RDMA_NL_ cxgb4/

cxgb4/cm.c: iwpm_remove_mapping(>com.local_addr, RDMA_NL_C4IW);
cxgb4/cm.c: _ep->com.remote_addr, RDMA_NL_C4IW);
cxgb4/cm.c: iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_C4IW);
cxgb4/cm.c: iwpm_err = iwpm_add_and_query_mapping(_msg, 
RDMA_NL_C4IW);

cxgb4/cm.c: >com.mapped_local_addr, RDMA_NL_C4IW)) {
cxgb4/cm.c: iwpm_remove_mapping(>com.local_addr, RDMA_NL_C4IW);
cxgb4/cm.c: iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_C4IW);
cxgb4/cm.c: iwpm_err = iwpm_add_mapping(_msg, RDMA_NL_C4IW);
cxgb4/cm.c: >com.mapped_local_addr, RDMA_NL_C4IW)) {
cxgb4/device.c: [RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
cxgb4/device.c: [RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
cxgb4/device.c: [RDMA_NL_IWPM_QUERY_MAPPING] = {.dump = 
iwpm_add_and_query_mapping_cb},

cxgb4/device.c: [RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
cxgb4/device.c: [RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
cxgb4/device.c: [RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
cxgb4/device.c: [RDMA_NL_IWPM_MAPINFO_NUM] = {.dump = 
iwpm_ack_mapping_info_cb}

cxgb4/device.c: if (ibnl_add_client(RDMA_NL_C4IW, RDMA_NL_IWPM_NUM_OPS,
cxgb4/device.c: err = iwpm_init(RDMA_NL_C4IW);
cxgb4/device.c: ibnl_remove_client(RDMA_NL_C4IW);
cxgb4/device.c: iwpm_exit(RDMA_NL_C4IW);
cxgb4/device.c: ibnl_remove_client(RDMA_NL_C4IW);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V1 15/16] i40iw: add entry in rdma_netlink

2015-12-23 Thread Faisal Latif
On Wed, Dec 23, 2015 at 08:50:15AM -0800, Or Gerlitz wrote:
> On 12/22/2015 1:13 AM, Faisal Latif wrote:
> > Add entry for port mapper services.
> >
> > Signed-off-by: Faisal Latif 
> > ---
> >   include/uapi/rdma/rdma_netlink.h | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/include/uapi/rdma/rdma_netlink.h 
> > b/include/uapi/rdma/rdma_netlink.h
> > index c19a5dc..4fa418d 100644
> > --- a/include/uapi/rdma/rdma_netlink.h
> > +++ b/include/uapi/rdma/rdma_netlink.h
> > @@ -8,6 +8,7 @@ enum {
> > RDMA_NL_NES,
> > RDMA_NL_C4IW,
> > RDMA_NL_LS, /* RDMA Local Services */
> > +   RDMA_NL_I40IW,
> > RDMA_NL_NUM_CLIENTS
> >   };
> >   
> Do you use this value in down-stream patches of the series? if yes, 
> change the order to have this and other IB core changes before the code 
> that use that.

Yes, I will move this patch up before it being used.

> 
> Why the iwarp port mapper implementationhas to be repeated in each 
> driver? can you join your code in a common place and avoid the duplication?
> 
> root@r-dcs58 hw]# git grep RDMA_NL_ nes
> nes/nes.c:  [RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
> nes/nes.c:  [RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
> nes/nes.c:  [RDMA_NL_IWPM_QUERY_MAPPING] = {.dump = 
> iwpm_add_and_query_mapping_cb},
> nes/nes.c:  [RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
> nes/nes.c:  [RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
> nes/nes.c:  [RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
> nes/nes.c:  [RDMA_NL_IWPM_MAPINFO_NUM] = {.dump = 
> iwpm_ack_mapping_info_cb}
> nes/nes.c:  if (ibnl_add_client(RDMA_NL_NES, RDMA_NL_IWPM_NUM_OPS, 
> nes_nl_cb_table))
> nes/nes.c:  ret = iwpm_init(RDMA_NL_NES);
> nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
> nes/nes.c:  ibnl_remove_client(RDMA_NL_NES);
> nes/nes.c:  iwpm_exit(RDMA_NL_NES);
> nes/nes_cm.c: _sockaddr, RDMA_NL_NES);
> nes/nes_cm.c:   return iwpm_remove_mapping(_sockaddr, RDMA_NL_NES);
> nes/nes_cm.c:   _addr, RDMA_NL_NES);
> nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg, 
> RDMA_NL_NES);
> nes/nes_cm.c:   iwpm_err = iwpm_add_mapping(_msg, 
> RDMA_NL_NES);
> nes/nes_cm.c:   iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_NES);
> nes/nes_cm.c:   iwpm_err = iwpm_add_and_query_mapping(_msg, 
> RDMA_NL_NES);
> 
> [root@r-dcs58 hw]# git grep RDMA_NL_ cxgb4/
> 
> cxgb4/cm.c: iwpm_remove_mapping(>com.local_addr, RDMA_NL_C4IW);
> cxgb4/cm.c: _ep->com.remote_addr, RDMA_NL_C4IW);
> cxgb4/cm.c: iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_C4IW);
> cxgb4/cm.c: iwpm_err = iwpm_add_and_query_mapping(_msg, 
> RDMA_NL_C4IW);
> cxgb4/cm.c: >com.mapped_local_addr, RDMA_NL_C4IW)) {
> cxgb4/cm.c: iwpm_remove_mapping(>com.local_addr, RDMA_NL_C4IW);
> cxgb4/cm.c: iwpm_err = iwpm_register_pid(_reg_msg, RDMA_NL_C4IW);
> cxgb4/cm.c: iwpm_err = iwpm_add_mapping(_msg, RDMA_NL_C4IW);
> cxgb4/cm.c: >com.mapped_local_addr, RDMA_NL_C4IW)) {
> cxgb4/device.c: [RDMA_NL_IWPM_REG_PID] = {.dump = iwpm_register_pid_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_ADD_MAPPING] = {.dump = iwpm_add_mapping_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_QUERY_MAPPING] = {.dump = 
> iwpm_add_and_query_mapping_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_HANDLE_ERR] = {.dump = iwpm_mapping_error_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_REMOTE_INFO] = {.dump = iwpm_remote_info_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_MAPINFO] = {.dump = iwpm_mapping_info_cb},
> cxgb4/device.c: [RDMA_NL_IWPM_MAPINFO_NUM] = {.dump = 
> iwpm_ack_mapping_info_cb}
> cxgb4/device.c: if (ibnl_add_client(RDMA_NL_C4IW, RDMA_NL_IWPM_NUM_OPS,
> cxgb4/device.c: err = iwpm_init(RDMA_NL_C4IW);
> cxgb4/device.c: ibnl_remove_client(RDMA_NL_C4IW);
> cxgb4/device.c: iwpm_exit(RDMA_NL_C4IW);
> cxgb4/device.c: ibnl_remove_client(RDMA_NL_C4IW);
> 

i40iw iwarp driver registers with port mapper and uses its services. Beside 
that it is not
the scope of the patch series.

Thanks
Faisal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html