From owner-p4-projects@FreeBSD.ORG Fri Sep 7 04:39:10 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9682216A418; Fri, 7 Sep 2007 04:39:10 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58C4516A419 for ; Fri, 7 Sep 2007 04:39:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 45C0913C465 for ; Fri, 7 Sep 2007 04:39:10 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l874dALp044366 for ; Fri, 7 Sep 2007 04:39:10 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l874d9h9044363 for perforce@freebsd.org; Fri, 7 Sep 2007 04:39:09 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 7 Sep 2007 04:39:09 GMT Message-Id: <200709070439.l874d9h9044363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126146 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2007 04:39:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=126146 Change 126146 by kmacy@kmacy:storage:toestack on 2007/09/07 04:38:43 add rudimentary toecore module for pub-sub relationship between TOMs and offload devices Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.c#1 add .. //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.h#2 edit .. //depot/projects/toestack/sys/modules/cxgb/Makefile#3 edit .. //depot/projects/toestack/sys/modules/cxgb/cxgb/Makefile#1 add .. //depot/projects/toestack/sys/modules/cxgb/toecore/Makefile#1 add Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/ulp/toecore/toedev.h#2 (text+ko) ==== @@ -85,6 +85,7 @@ }; struct toedev { + TAILQ_ENTRY(toedev) entry; char name[TOENAMSIZ]; /* TOE device name */ enum toetype type; struct adapter *adapter; @@ -95,7 +96,6 @@ struct ifnet *lldev; /* LL device associated with TOE messages */ const struct tom_info *offload_mod; /* attached TCP offload module */ struct sysctl_oid *sysctl_root; /* root of proc dir for this TOE */ - TAILQ_ENTRY(toedev) ofld_entry; /* for list linking */ int (*open)(struct toedev *dev); int (*close)(struct toedev *dev); int (*can_offload)(struct toedev *dev, struct socket *so); @@ -104,7 +104,7 @@ int (*send)(struct toedev *dev, struct mbuf *m); int (*recv)(struct toedev *dev, struct mbuf **m, int n); int (*ctl)(struct toedev *dev, unsigned int req, void *data); - void (*neigh_update)(struct toedev *dev, struct rtentry *neigh); + void (*arp_update)(struct toedev *dev, struct rtentry *neigh); void (*failover)(struct toedev *dev, struct ifnet *bond_ifp, struct ifnet *ndev, int event); void *priv; /* driver private data */ @@ -115,11 +115,11 @@ }; struct tom_info { + TAILQ_ENTRY(tom_info) entry; int (*attach)(struct toedev *dev, const struct offload_id *entry); int (*detach)(struct toedev *dev); const char *name; const struct offload_id *id_table; - TAILQ_ENTRY(tom_info) entry; }; static inline void init_offload_dev(struct toedev *dev) @@ -133,10 +133,12 @@ extern int unregister_toedev(struct toedev *dev); extern int activate_offload(struct toedev *dev); extern int toe_send(struct toedev *dev, struct mbuf *m); +extern void toe_arp_update(struct rtentry *rt); extern struct ifnet *offload_get_phys_egress(struct ifnet *dev, struct socket *so, int context); - +extern int toe_receive_mbuf(struct toedev *dev, struct mbuf **m, int n); + #if defined(CONFIG_TCP_OFFLOAD_MODULE) static inline int toe_receive_mbuf(struct toedev *dev, struct mbuf **m, int n) ==== //depot/projects/toestack/sys/modules/cxgb/Makefile#3 (text+ko) ==== @@ -1,47 +1,5 @@ -# $FreeBSD: src/sys/modules/cxgb/Makefile,v 1.9 2007/07/17 06:50:35 kmacy Exp $ +# $FreeBSD$ +SUBDIR= cxgb +SUBDIR+= toecore -CXGB = ${.CURDIR}/../../dev/cxgb -.PATH: ${CXGB} ${CXGB}/common ${CXGB}/sys - -KMOD= if_cxgb -SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv88e1xxx.c -SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c -SRCS+= cxgb_sge.c cxgb_lro.c cxgb_offload.c cxgb_l2t.c -SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h -SRCS+= uipc_mvec.c cxgb_multiq.c - -CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP -#CFLAGS+= -DIFNET_MULTIQUEUE -#CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS -#CFLAGS+= -DWITNESS -#CFLAGS+= -DDEBUG -DDEBUG_PRINT - - -.if ${MACHINE_ARCH} != "ia64" -# ld is broken on ia64 -t3fw-4.5.0.bin: ${CXGB}/t3fw-4.5.0.bin.gz.uu - uudecode -p < ${CXGB}/t3fw-4.5.0.bin.gz.uu \ - | gzip -dc > ${.TARGET} - -FIRMWS= t3fw-4.5.0.bin:t3fw450 -CLEANFILES+= t3fw-4.5.0.bin - -t3b_protocol_sram-1.1.0.bin: ${CXGB}/t3b_protocol_sram-1.1.0.bin.gz.uu - uudecode -p < ${CXGB}/t3b_protocol_sram-1.1.0.bin.gz.uu \ - | gzip -dc > ${.TARGET} - -FIRMWS+= t3b_protocol_sram-1.1.0.bin:t3bps110 -CLEANFILES+= t3b_protocol_sram-1.1.0.bin - -t3b_tp_eeprom-1.1.0.bin: ${CXGB}/t3b_tp_eeprom-1.1.0.bin.gz.uu - uudecode -p < ${CXGB}/t3b_tp_eeprom-1.1.0.bin.gz.uu \ - | gzip -dc > ${.TARGET} - -FIRMWS+= t3b_tp_eeprom-1.1.0.bin:t3btpe110 -CLEANFILES+= t3b_tp_eeprom-1.1.0.bin - - -.endif - - -.include +.include