RE: [PATCH v3 12/15] IB/pvrdma: Add the main driver module for PVRDMA

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

 



On Thu, Sep 01, 2016 at 06:21:06 -0700, Yuval Shaia wrote:
> Please see two comments inline.
> 
> Yuval
> 
> On Wed, Aug 03, 2016 at 04:27:41PM -0700, Adit Ranadive wrote:
> > This patch adds the support to register a RDMA device with the kernel
> > RDMA stack as well as a kernel module. This also initializes the
> > underlying virtual PCI device.
> >
> > Changes from v1: Addressed 32-bit build errors. Addressed comments by
> > Yuval Shaia.
> >
> > Changes v2->v3:
> >  - Removed boolean in pvrdma_cmd_post.
> >
> > Reviewed-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
> > Reviewed-by: Jorgen Hansen <jhansen@xxxxxxxxxx>
> > Reviewed-by: George Zhang <georgezhang@xxxxxxxxxx>
> > Reviewed-by: Aditya Sarwade <asarwade@xxxxxxxxxx>
> > Reviewed-by: Bryan Tan <bryantan@xxxxxxxxxx>
> > Signed-off-by: Adit Ranadive <aditr@xxxxxxxxxx>
> > ---
> >  drivers/infiniband/hw/pvrdma/pvrdma_main.c | 1190
> > ++++++++++++++++++++++++++++
> >  1 file changed, 1190 insertions(+)
> >  create mode 100644 drivers/infiniband/hw/pvrdma/pvrdma_main.c

...

> > +
> > +static void pvrdma_netdevice_event_handle(struct pvrdma_dev *dev,
> > +					  unsigned long event)
> > +{
> > +	struct net_device *netdev;
> > +
> > +	netdev = dev->netdev;
> 
> The above two lines are redundant, please remove., please remove.

Ok.

> > +	switch (event) {
> > +	case NETDEV_REBOOT:
> > +	case NETDEV_DOWN:
> > +		pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ERR);
> > +		break;
> > +	case NETDEV_UP:
> > +		pvrdma_dispatch_event(dev, 1, IB_EVENT_PORT_ACTIVE);
> > +		break;
> > +	default:
> > +		dev_dbg(&dev->pdev->dev, "ignore netdevice event %ld on
> %s\n",
> > +			event, dev->ib_dev.name);
> > +		break;
> > +	}
> > +}
> > +

...

> > +
> > +	if (pdev_net->vendor != PCI_VENDOR_ID_VMWARE ||
> > +	    pdev_net->device != PCI_DEVICE_ID_VMWARE_VMXNET3) {
> > +		dev_err(&pdev->dev, "failed to find paired vmxnet3
> device\n");
> > +		pci_dev_put(pdev_net);
> > +		ret = -ENODEV;
> > +		goto err_free_cq_ring;
> > +	}
> 
> Any reason to enforce to this netdev only?

Yes, we expose our device to the guest as a dual function PCIe device with
Ethernet (VMXNet3) and RDMA (PVRDMA) capabilities. We use the VMXNet3
netdev to find the Ethernet properties required in the PVRDMA module.

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




[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