PERFORCE change 187920 for review

Alexandre Fiveg afiveg at FreeBSD.org
Tue Jan 18 15:58:42 UTC 2011


http://p4web.freebsd.org/@@187920?ac=10

Change 187920 by afiveg at cottonmouth on 2011/01/18 15:58:37

	The character special device is named now as ringmap_<iface>

Affected files ...

.. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.c#57 edit
.. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.h#56 edit

Differences ...

==== //depot/projects/soc2010/ringmap/current/sys/net/ringmap.c#57 (text+ko) ====

@@ -100,7 +100,7 @@
 	 */
 	rm->cdev = make_dev(&ringmap_devsw, device_get_unit(dev),
 						UID_ROOT, GID_WHEEL, 0666, 
-						device_get_nameunit(dev));
+						RINGMAP_DEVICE(device_get_nameunit(dev)));
 	if (rm->cdev == NULL) {
 		RINGMAP_ERROR(Can not create character device);
 		FREE(rm, M_DEVBUF);

==== //depot/projects/soc2010/ringmap/current/sys/net/ringmap.h#56 (text+ko) ====

@@ -12,7 +12,7 @@
  * Prefix for name of device (for example /dev/ringmap_em0 will full name) 
  * currently not used, but it will!
  */
-#define RINGMAP_DEVICE 		"ringmap"
+#define RINGMAP_DEVICE(iface) 		"ringmap_"#iface
 
 /*
  * Default queue number. For multiqueue. Currently not used!
@@ -309,18 +309,18 @@
 
 #define PACKET_ADDR_DEB(ring, i)	\
 	if (__RINGMAP_DEB) {							\
-		printf("=+= packet.user=0x%X, packet.phys=0x%X, packet.kern=0x%X\n",\
-		(unsigned int)ring->slot[i].packet.user, 	\
-		(unsigned int)ring->slot[i].packet.phys, 	\
-		(unsigned int)ring->slot[i].packet.kern);	\
+		printf("=+= packet.user=%p, packet.phys=%p, packet.kern=%p\n",\
+				(void *)ring->slot[i].packet.user, 	\
+				(void *)ring->slot[i].packet.phys, 	\
+				(void *)ring->slot[i].packet.kern);	\
 	};
 
 #define PRINT_MBUF_ADDR(ring, i)	\
 	do {							\
-		printf("=+= mbuf.user=0x%X, mbuf.phys=0x%llX, mbuf.kern=0x%X\n",  \
-		(unsigned int)ring->slot[i].mbuf.user,			\
-		(long long unsigned int)ring->slot[i].mbuf.phys,\
-		(unsigned int)ring->slot[i].mbuf.kern);			\
+		printf("=+= mbuf.user=%p, mbuf.phys=%p, mbuf.kern=%p\n",  \
+				(void *)ring->slot[i].mbuf.user,			\
+				(void *)ring->slot[i].mbuf.phys,			\
+				(void *)ring->slot[i].mbuf.kern);			\
 	} while (0);
 
 #define PRINT_SLOT(ring, i)												\


More information about the p4-projects mailing list