From owner-p4-projects@FreeBSD.ORG Sat Mar 15 18:47:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9BAE6106567A; Sat, 15 Mar 2008 18:47:48 +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 5B1FA106566C for ; Sat, 15 Mar 2008 18:47:48 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 62CD88FC13 for ; Sat, 15 Mar 2008 18:47:48 +0000 (UTC) (envelope-from csjp@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 m2FIlmTq061800 for ; Sat, 15 Mar 2008 18:47:48 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2FIlmvF061798 for perforce@freebsd.org; Sat, 15 Mar 2008 18:47:48 GMT (envelope-from csjp@freebsd.org) Date: Sat, 15 Mar 2008 18:47:48 GMT Message-Id: <200803151847.m2FIlmvF061798@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 137790 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: Sat, 15 Mar 2008 18:47:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=137790 Change 137790 by csjp@ibm01 on 2008/03/15 18:47:15 - Add a pad element to inform users that this space is not being used as the compiler will align subsequent intgers to a 4 byte boundary since the structure is not packed. - Change the counters from unsigned to explicitly 64 bits Affected files ... .. //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#11 edit Differences ... ==== //depot/projects/zcopybpf/src/sys/net/bpfdesc.h#11 (text+ko) ==== @@ -75,8 +75,8 @@ #ifdef BPF_JITTER bpf_jit_filter *bd_bfilter; /* binary filter code */ #endif - u_long bd_rcount; /* number of packets received */ - u_long bd_dcount; /* number of packets dropped */ + u_int64_t bd_rcount; /* number of packets received */ + u_int64_t bd_dcount; /* number of packets dropped */ u_char bd_promisc; /* true if listening promiscuously */ u_char bd_state; /* idle, waiting, or timed out */ @@ -91,14 +91,14 @@ struct mtx bd_mtx; /* mutex for this descriptor */ struct callout bd_callout; /* for BPF timeouts with select */ struct label *bd_label; /* MAC label for descriptor */ - u_long bd_fcount; /* number of packets which matched filter */ + u_int64_t bd_fcount; /* number of packets which matched filter */ pid_t bd_pid; /* PID which created descriptor */ int bd_locked; /* true if descriptor is locked */ u_int bd_bufmode; /* Current buffer mode. */ - u_long bd_wcount; /* number of packets written */ - u_long bd_wfcount; /* number of packets that matched write filter */ - u_long bd_wdcount; /* number of packets dropped during a write */ - u_long bd_zcopy; /* number of zero copy operations */ + u_int64_t bd_wcount; /* number of packets written */ + u_int64_t bd_wfcount; /* number of packets that matched write filter */ + u_int64_t bd_wdcount; /* number of packets dropped during a write */ + u_int64_t bd_zcopy; /* number of zero copy operations */ }; /* Values for bd_state */ @@ -117,13 +117,14 @@ u_int bd_structsize; /* Size of this structure. */ u_char bd_promisc; u_char bd_immediate; + u_char __bd_pad[6]; int bd_hdrcmplt; int bd_direction; int bd_feedback; int bd_async; - u_long bd_rcount; - u_long bd_dcount; - u_long bd_fcount; + u_int64_t bd_rcount; + u_int64_t bd_dcount; + u_int64_t bd_fcount; int bd_sig; int bd_slen; int bd_hlen; @@ -131,10 +132,14 @@ pid_t bd_pid; char bd_ifname[IFNAMSIZ]; int bd_locked; - u_long bd_wcount; - u_long bd_wfcount; - u_long bd_wdcount; - u_long bd_zcopy; + u_int64_t bd_wcount; + u_int64_t bd_wfcount; + u_int64_t bd_wdcount; + u_int64_t bd_zcopy; + /* + * Spare 64 bit integers for future expansion. + */ + u_int64_t bd_spare[4]; }; #define BPFIF_LOCK(bif) mtx_lock(&(bif)->bif_mtx)