public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Hal Rosenstock
	<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	Somnath Kotur
	<somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	sriharsha.basavapatna-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	sagi-TmH2Wj2nsNJBDLzU/O5InQ@public.gmane.org, "Weiny,
	Ira" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Bart Van Assche
	<bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v1] IB/core: Add generic function to extract IB speed from netdev
Date: Thu, 8 Jun 2017 16:27:04 +0300	[thread overview]
Message-ID: <20170608132703.GA12619@yuvallap> (raw)
In-Reply-To: <CAG9sBKNK9MXq+x=f+H6TnZVQP1t7X=2bZEpCjzYrNtCQxq2xsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Thu, Jun 08, 2017 at 08:43:41AM +0300, Moni Shoua wrote:
> >> >
> >> > +void ib_get_speed(struct net_device *netdev, u8 *speed, u8 *width)
> >> > +{
> >> > +   int rc;
> >> > +   u32 netdev_speed = SPEED_UNKNOWN;
> >> > +
> >
> > [1]
> >
> I think it should be clear that this function is good only for RoCE
> If you pass struct ib_device* instead of struct net_device* you can
> check link layer and return bad status of it is not Ethernet

Will do.

> The net_device will be obtained via get_netdev() hook.

So every explicit usage of ibdev->netdev can be considered as bed practice?

> Consider adding _eth_ to the name of the function (e.g. ib_get_etht_speed)

Will do.

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

      parent reply	other threads:[~2017-06-08 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 19:36 [PATCH v1] IB/core: Add generic function to extract IB speed from netdev Yuval Shaia
     [not found] ` <20170606193622.25552-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-06-07 16:50   ` Leon Romanovsky
     [not found]     ` <20170607165022.GF1127-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-06-07 19:46       ` Yuval Shaia
2017-06-08  5:16         ` Leon Romanovsky
2017-06-08  5:43         ` Moni Shoua
     [not found]           ` <CAG9sBKNK9MXq+x=f+H6TnZVQP1t7X=2bZEpCjzYrNtCQxq2xsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-08 13:27             ` Yuval Shaia [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=20170608132703.GA12619@yuvallap \
    --to=yuval.shaia-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sagi-TmH2Wj2nsNJBDLzU/O5InQ@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=sriharsha.basavapatna-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /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