Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Kamal Heib <kamalheib1@gmail.com>
To: Zhu Yanjun <zyjzyj2000@gmail.com>
Cc: linux-rdma@vger.kernel.org, Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Zhu Yanjun <yanjunz@mellanox.com>
Subject: Re: [PATCH for-next 4/4] RDMA/rxe: Remove rxe_link_layer()
Date: Sun, 5 Jul 2020 13:30:58 +0300	[thread overview]
Message-ID: <20200705103058.GB280842@kheib-workstation> (raw)
In-Reply-To: <CAD=hENe33xJ+WEj3q7DpVB17Cn+Yu9Sz6at=oZKhDdz_PR9bKw@mail.gmail.com>

On Sun, Jul 05, 2020 at 09:49:31AM +0800, Zhu Yanjun wrote:
> On Fri, Jul 3, 2020 at 11:35 PM Kamal Heib <kamalheib1@gmail.com> wrote:
> >
> > Instead of return IB_LINK_LAYER_ETHERNET from rxe_link_layer return it
> > directly from get_link_layer callback and remove rxe_link_layer().
> >
> > Fixes: 8700e3e7c485 ("Soft RoCE driver")
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> >  drivers/infiniband/sw/rxe/rxe_loc.h   | 1 -
> >  drivers/infiniband/sw/rxe/rxe_net.c   | 5 -----
> >  drivers/infiniband/sw/rxe/rxe_verbs.c | 4 +---
> >  3 files changed, 1 insertion(+), 9 deletions(-)
> >
> > diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
> > index 0688928cf2b1..39dc3bfa5d5d 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_loc.h
> > +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
> > @@ -142,7 +142,6 @@ int rxe_send(struct rxe_pkt_info *pkt, struct sk_buff *skb);
> >  struct sk_buff *rxe_init_packet(struct rxe_dev *rxe, struct rxe_av *av,
> >                                 int paylen, struct rxe_pkt_info *pkt);
> >  int rxe_prepare(struct rxe_pkt_info *pkt, struct sk_buff *skb, u32 *crc);
> > -enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num);
> >  const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num);
> >  struct device *rxe_dma_device(struct rxe_dev *rxe);
> >  int rxe_mcast_add(struct rxe_dev *rxe, union ib_gid *mgid);
> > diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
> > index 312c2fc961c0..0c3808611f95 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_net.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> > @@ -520,11 +520,6 @@ const char *rxe_parent_name(struct rxe_dev *rxe, unsigned int port_num)
> >         return rxe->ndev->name;
> >  }
> >
> > -enum rdma_link_layer rxe_link_layer(struct rxe_dev *rxe, unsigned int port_num)
> > -{
> > -       return IB_LINK_LAYER_ETHERNET;
> > -}
> 
> This is a wrapper function.

Correct, but it's used only once.
So, I don't see the point of having it.

Thanks,
Kamal

> 
> Zhu Yanjun
> > -
> >  int rxe_net_add(const char *ibdev_name, struct net_device *ndev)
> >  {
> >         int err;
> > diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
> > index ee80b8862db8..a3cf9bbe818d 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> > @@ -141,9 +141,7 @@ static int rxe_modify_port(struct ib_device *dev,
> >  static enum rdma_link_layer rxe_get_link_layer(struct ib_device *dev,
> >                                                u8 port_num)
> >  {
> > -       struct rxe_dev *rxe = to_rdev(dev);
> > -
> > -       return rxe_link_layer(rxe, port_num);
> > +       return IB_LINK_LAYER_ETHERNET;
> >  }
> >
> >  static int rxe_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata)
> > --
> > 2.25.4
> >

      parent reply	other threads:[~2020-07-05 10:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 15:34 [PATCH for-next 0/4] RDMA/rxe: Cleanups and improvements Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 1/4] RDMA/rxe: Drop pointless checks in rxe_init_ports Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 2/4] RDMA/rxe: Return void from rxe_init_port_param() Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 3/4] RDMA/rxe: Return void from rxe_mem_init_dma() Kamal Heib
2020-07-03 15:34 ` [PATCH for-next 4/4] RDMA/rxe: Remove rxe_link_layer() Kamal Heib
2020-07-04  4:18   ` Zhu Yanjun
2020-07-05 10:27     ` Kamal Heib
2020-07-05  1:49   ` Zhu Yanjun
2020-07-05  7:46     ` Leon Romanovsky
2020-07-05 10:30     ` Kamal Heib [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=20200705103058.GB280842@kheib-workstation \
    --to=kamalheib1@gmail.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjunz@mellanox.com \
    --cc=zyjzyj2000@gmail.com \
    /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