Re: [PATCH v6 3/4] RDMA/Core: add RDMA_NLDEV_CMD_NEWLINK/DELLINK support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 10, 2018 at 10:27:47AM -0600, Steve Wise wrote:

> > +struct ib_device *ib_device_get_by_netdev(struct net_device *ndev,
> > +					  enum rdma_driver_id driver_id)
> > +{
> > +	struct ib_device *ib_dev;
> > +
> > +	down_read(&lists_rwsem);
> > +	list_for_each_entry(ib_dev, &device_list, core_list) {
> > +		unsigned int port;
> > +
> > +		if (driver_id != RDMA_DRIVER_UNKNOWN &&
> > +		    ib_dev->driver_id != driver_id)
> > +			continue;
> > +
> > +		if (!ib_dev->get_netdev)
> > +			continue;
> > +
> > +		for (port = rdma_start_port(ib_dev);
> > +		     port <= rdma_end_port(ib_dev); port++) {
> > +			struct net_device *idev;
> > +
> > +			if (!rdma_protocol_roce(ib_dev, port))
> > +				continue;
> > +
> 
> Why only roce devices?

No specific reason, this pattern was just in the code above I copied
this from. Both places probably need some revision to support iwarp.
 
Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux