From owner-p4-projects@FreeBSD.ORG Sun Apr 29 03:02:14 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A33AD16A404; Sun, 29 Apr 2007 03:02:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 635B116A401 for ; Sun, 29 Apr 2007 03:02:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7C313C448 for ; Sun, 29 Apr 2007 03:02:14 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3T32E4Y010472 for ; Sun, 29 Apr 2007 03:02:14 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3T32EAf010468 for perforce@freebsd.org; Sun, 29 Apr 2007 03:02:14 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 29 Apr 2007 03:02:14 GMT Message-Id: <200704290302.l3T32EAf010468@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 118926 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: Sun, 29 Apr 2007 03:02:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=118926 Change 118926 by kmacy@kmacy_vt-x:opentoe_init on 2007/04/29 03:02:05 TOE on linux appears to rely on having a backpointer from the skb to the socket - add a field to allow me to do the same on FreeBSD until I can find away around this The fact of the matter is that, network offload, like graphics offload, requires modifications to the layer interfaces - the current interfaces are not god-given and may need to be re-examined in the future. That said, I'm not going to advocate the skb style strategy of having pointers to everything in the network stack "just in case". Affected files ... .. //depot/projects/opentoe/sys/sys/mbuf.h#7 edit Differences ... ==== //depot/projects/opentoe/sys/sys/mbuf.h#7 (text+ko) ==== @@ -122,6 +122,7 @@ int csum_data; /* data field used by csum routines */ u_int16_t tso_segsz; /* TSO segment size */ u_int16_t ether_vtag; /* Ethernet 802.1p+q vlan tag */ + void * priv; /* opaque pointer for protocol offload support */ SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ }; @@ -196,7 +197,8 @@ #define M_VLANTAG 0x10000 /* ether_vtag is valid */ #define M_PROMISC 0x20000 /* packet was not for us */ #define M_LRO 0x80000 /* large receive offload in use for packet */ -#define M_IOVEC 0x100000 /* mbuf immediate data area is used for cluster ptrs */ +#define M_IOVEC 0x100000 /* mbuf immediate data area is used for cluster ptrs */ +#define M_TOE 0x200000 /* packet is handled by protocol offload */ /* * External buffer types: identify ext_buf type.