PERFORCE change 179713 for review

John Baldwin jhb at freebsd.org
Wed Jun 23 20:20:48 UTC 2010


On Thursday 17 June 2010 10:46:27 am Alexandre Fiveg wrote:
> http://p4web.freebsd.org/@@179713?ac=10
> 
> Change 179713 by afiveg at cottonmouth on 2010/06/17 14:46:03
> 
> 	Begin with new design for ringmap: 
> 		1. The new structure with pointers to hardware dependent functions: 
> 			"struct ringmap_functions" (/net/ringmap.h)
> 		2. Pointer to this structure placed in ringmap structure. 
> 		3. In the ringmap_attach function look for pci Id of network controller, 
> 			and then, depending on controllers type, initialize the functions pointers:
> 			(ringmap.c: set_ringmap_funcs())

I think 3) is the wrong way to go about it.  Can't you have the NIC driver
attach a ringmap and supply the function pointers to the NIC-specific
functionality instead?  You really don't want to have two separate lists of
device IDs.  The ringmap list will invariably become stale.

-- 
John Baldwin


More information about the p4-projects mailing list