PERFORCE change 187913 for review

Alexandre Fiveg afiveg at FreeBSD.org
Tue Jan 18 14:21:03 UTC 2011


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

Change 187913 by afiveg at cottonmouth on 2011/01/18 14:19:59

	deleting ringmap* files from -STABLE tree. I'll make a branch 
	for these files from -CURRENT to -STABLE

Affected files ...

.. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.c#56 edit
.. //depot/projects/soc2010/ringmap/current/sys/net/ringmap.h#55 edit
.. //depot/projects/soc2010/ringmap/current/sys/net/ringmap_kernel.h#24 edit
.. //depot/projects/soc2010/ringmap/stable_8/contrib/libringmap/libringmap.c#2 edit
.. //depot/projects/soc2010/ringmap/stable_8/contrib/libringmap/libringmap.h#2 edit
.. //depot/projects/soc2010/ringmap/stable_8/sys/net/ringmap.c#5 delete
.. //depot/projects/soc2010/ringmap/stable_8/sys/net/ringmap.h#4 delete
.. //depot/projects/soc2010/ringmap/stable_8/sys/net/ringmap_kernel.h#4 delete

Differences ...

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

@@ -61,7 +61,7 @@
 	.d_open 	= ringmap_open,
 	.d_close 	= ringmap_close,
 	.d_ioctl	= ringmap_ioctl,
-	.d_read		= ringmap_read,		/* Tell to user ring physical addr */
+	.d_read		= ringmap_read,	
 	.d_name 	= "ringmap_cdev"
 };
 
@@ -70,9 +70,9 @@
 
 
 /*
- * The function should be called from the attach function of generic network
- * driver. Here the ringmap structure is allocated and the character special
- * device for the communication with user is created. Also default ringmap
+ * The function is called from the attach function of generic network
+ * driver. Here is the ringmap structure allocated and the character special
+ * device for the communication with user created. Also default ringmap
  * functions are set.
  */
 struct ringmap *
@@ -116,7 +116,7 @@
 	/* 
 	 * Initialize the list of capturing objects. Each object represents the
 	 * thread that capture traffic and its ring. The objects werden created 
-	 * by open(2): see ringmap_open() further.
+	 * by open(2): see ringmap_open().
 	 */
 	SLIST_INIT(&rm->object_list);
 

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


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


==== //depot/projects/soc2010/ringmap/stable_8/contrib/libringmap/libringmap.c#2 (text+ko) ====

@@ -1,0 +1,45 @@
+#include "libringmap.h"
+
+struct ring_handle * get_ring_handle(ringhandle_t);
+
+struct ring_handle {
+
+	ringhandle_t handle;
+
+	/* String that specifies the network device */
+	char *iface;		
+
+	/* 
+	 * File descriptor of character special device for communication with
+	 * ringmap in the kernel
+	 */
+	int cdev_fd;			
+
+	/* Each ring is with an unique integer number associated */
+	int ringnum;
+
+	/* Type of ring (queue) RX or TX */
+	int ringtype;
+
+	/* 
+	 * The number of slot in the ring buffer that is currently taken for
+	 * reading by userspace process
+	 */
+	unsigned int current_buffer;
+
+	/*
+	 * Pointer to the structure that represents the shared packet ring buffer
+	 */
+	struct ring *ring;
+
+	/* not in use yet */
+	int status;
+};
+
+
+int 
+get_ring_size(ringhandle_t)
+{
+
+	return (0);
+}

==== //depot/projects/soc2010/ringmap/stable_8/contrib/libringmap/libringmap.h#2 (text+ko) ====

@@ -1,4 +1,3 @@
-
 #define TYPE_RX_RING		0x0001
 #define TYPE_TX_RING		0x0002
 
@@ -6,38 +5,6 @@
 
 struct ring;
 
-struct ring_handle {
-	
-	/* String that specifies the network device */
-	char *iface;		
-
-	/* 
-	 * File descriptor of character special device for communication with
-	 * ringmap in the kernel
-	 */
-	int cdev_fd;			
-
-	/* Each ring is with an unique integer number associated */
-	int ringnum;
-
-	/* Type of ring (queue) RX or TX */
-	int ringtype;
-
-	/* 
-	 * The number of slot in the ring buffer that is currently taken for
-	 * reading by userspace process
-	 */
-	unsigned int current_buffer;
-
-	/*
-	 * Pointer to the structure that represents the shared packet ring buffer
-	 */
-	struct ring *ring;
-
-	/* not in use yet */
-	int status;
-};
-
 /*
  * This structure describes the conditions of an event during 
  * reading the packet in the current_buffer. 
@@ -74,7 +41,7 @@
 	int pktfilter_accept;
 };
 
-/* The handle for a ring (or queue) */
+/* The handle for a ring (a.k.a queue) */
 typedef int ringhandle_t;
 
 /*
@@ -151,12 +118,12 @@
 /*
  * Returns the number of packet buffers in the ring
  */
-int get_ring_size(void);
+int get_ring_size(ringhandle_t);
 
 /*
- * Returns the size of a packet buffer in bytes
+ * Returns the size of a packet buffer (a.k.a. Ring-Slot) in bytes.
  */
-unsigned int get_pktbuf_size(void);
+unsigned int get_pktbuf_size(ringhandle_t);
 
 /*
  * Returns the number of available receive rings


More information about the p4-projects mailing list