summaryrefslogtreecommitdiffstats
path: root/sys/net/if_var.h
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-11-22 05:55:56 +0000
committerkmacy <kmacy@FreeBSD.org>2008-11-22 05:55:56 +0000
commit9d3bb599b193495af5419ee85be4afe9a18b6091 (patch)
tree0291af1a0fda6ca2d8e62cb1f363d45baefe0303 /sys/net/if_var.h
parentfb7f8e0e59cfa5b30a6f0b0d1377402f14c64673 (diff)
downloadFreeBSD-src-9d3bb599b193495af5419ee85be4afe9a18b6091.zip
FreeBSD-src-9d3bb599b193495af5419ee85be4afe9a18b6091.tar.gz
- bump __FreeBSD version to reflect added buf_ring, memory barriers,
and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r--sys/net/if_var.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 3f7a008..c6bcdf7 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -186,7 +186,11 @@ struct ifnet {
/* protected by if_addr_mtx */
void *if_pf_kif;
void *if_lagg; /* lagg glue */
- void *if_pspare[10]; /* multiq/TOE 3; vimage 3; general use 4 */
+ void *if_pspare[8]; /* multiq/TOE 3; vimage 3; general use 4 */
+ void (*if_qflush) /* flush any queues */
+ (struct ifnet *);
+ int (*if_transmit) /* initiate output routine */
+ (struct ifnet *, struct mbuf *);
int if_ispare[2]; /* general use 2 */
};
@@ -686,6 +690,9 @@ int ifioctl(struct socket *, u_long, caddr_t, struct thread *);
int ifpromisc(struct ifnet *, int);
struct ifnet *ifunit(const char *);
+void ifq_attach(struct ifaltq *, struct ifnet *ifp);
+void ifq_detach(struct ifaltq *);
+
struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *);
OpenPOWER on IntegriCloud