RE: [RFC 2/2] be2net: Added functionality to support RoCE driver

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

________________________________________
From: David Laight [David.Laight@xxxxxxxxxx]
Sent: Thursday, March 08, 2012 7:08 PM
To: Pandit, Parav; romieu@xxxxxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx
Subject: RE: [RFC 2/2] be2net: Added functionality to support RoCE driver

> > > + void *ocrdma_dev;
>
> > > Is there a reason why it could not be 'struct ocrdma_dev *o' ?
> [Parav] Yes. Reason is NIC driver publishes interface to RoCE
> driver. NIC driver is not aware of ocrdma_dev structure.
> So its void pointer.

If the argument can only ever be 'struct ocrdma_dev *'
then used the named structure pointer - you don't need to
expose the actual definition to the other drivers.

Makes it much more difficult to pass the address of an
inappropriate structure.
[Parav] If I understand correctly, I should do following.

Instead of void* in add(), remove(), event_handler(), 
it should be struct ocrdma_dev* with forward declaration.

Is that correct understanding?

        David


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


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux