From: Leon Romanovsky [mailto:[email protected]] Sent: Tuesday, June 27, 2017 8:37 AM > > On Mon, Jun 26, 2017 at 09:06:51PM +0300, Michal Kalderon wrote: > > iWARP personality introduced the need for differentiating in several > > places in the code whether we are RoCE, iWARP or either. This leads to > > introducing new macros for querying the personality. > > > > Signed-off-by: Michal Kalderon <[email protected]> > > Signed-off-by: Yuval Mintz <[email protected]> > > Signed-off-by: Ariel Elior <[email protected]> > > > > --- > > drivers/net/ethernet/qlogic/qed/qed.h | 26 +++++++++++++++++++++++-- > - > > drivers/net/ethernet/qlogic/qed/qed_cxt.c | 8 ++++---- > > drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 +++++------- > > drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +-- > > drivers/net/ethernet/qlogic/qed/qed_ll2.c | 2 +- > > drivers/net/ethernet/qlogic/qed/qed_main.c | 17 ++++++++--------- > > include/linux/qed/common_hsi.h | 2 +- > > 7 files changed, 43 insertions(+), 27 deletions(-) > > I see that these changes are in Ethernet part of your driver, but for RDMA > part, > there are already available inline functions: > rdma_protocol_iwarp, rdma_protocol_roce. > > Please avoid introducing new IS_IWARP/IS_ROCE macros and the decision > should be taken on port level and not on device, despite the fact that > probably > your ib_device has only one port. > > Thanks
We still need to differentiate between iWARP/RoCE before rdma_protocol_iwarp/rdma_protocol_roce will be valid (allocating resources, registering ib device, initializing ib_device, and capabilities. For the rest of the places, after the port capabilities are valid, we'll use the inline functions.
