netmap : about update single ring

root at root at
Thu May 31 14:11:46 UTC 2012

i want to update single ring use the ringid

like code:
struct netmap_ring *ring = NETMAP_TXRING(me->nifp, ringid);
i can't find a way to do this.
so i try to change the netmap core.

add code sys/net/netmap.h
    struct node {
	    int		ringid;
	    int		update;
#define NIOCTXNODE	_IOWR('i', 150, struct node)

add code in sys/dev/netmap/netmap.c
		if (priv == NULL) {
			error = ENXIO;
		ifp = priv->np_ifp;
		na = NA(ifp);
		node->ringid += priv->np_qfirst;
		na->nm_txsync(ifp, node->ringid, 1 /* do lock */);
in my case.
    struct node node;
    node.ringid = s;
    node.update = 0;
    ioctl(me->fd, NIOCTXNODE, &node);

but her can't work. 
have some error in somewhere, i can't found it.
can your help me ? luigi.

More information about the freebsd-current mailing list