Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f8JDMAE27035 for netdev-outgoing; Wed, 19 Sep 2001 06:22:10 -0700 Received: from web11501.mail.yahoo.com (web11501.mail.yahoo.com [216.136.172.46]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f8JDM6e27032 for ; Wed, 19 Sep 2001 06:22:06 -0700 Message-ID: <20010919132205.52080.qmail@web11501.mail.yahoo.com> Received: from [24.112.158.226] by web11501.mail.yahoo.com via HTTP; Wed, 19 Sep 2001 06:22:05 PDT Date: Wed, 19 Sep 2001 06:22:05 -0700 (PDT) From: Guilhem Tardy Subject: 3c59x.c modified for time measurement / code included To: netdev@oss.sgi.com, andrewm@uow.edu.au Cc: greearb@candelatech.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-netdev@oss.sgi.com Precedence: bulk Content-Length: 1847 Lines: 53 Hi all, I should be able to access skb->mac.{ethernet, raw} ahter eth_type_trans(skb, dev), but nevertheless I used skb->data in the code below. At this point, only a series of consecutive numbers are written for test purpose, but the result is nil: I get all but what is expected when I tcpdump packets received on this port. I thought that the error could reside in the filter on UDP & port, but it seems right. Any idea? Guilhem. --- parts of the function boomerang_rx(struct net_device *dev) in 3c59x.c --- (...) if (rx_status & RxDError) { /* Error, update stats. */ (...) } else { /* The packet length: up to 4.5K!. */ (...) skb->protocol = eth_type_trans(skb, dev); { /* Use hardware checksum info. */ /* ### avoid checksum on all packets ! */ // int csum_bits = rx_status & 0xee000000; // if (csum_bits && // (csum_bits == (IPChksumValid | TCPChksumValid) || // csum_bits == (IPChksumValid | UDPChksumValid))) { skb->ip_summed = CHECKSUM_UNNECESSARY; vp->rx_csumhits++; // } } /* ### add time */ if (*(skb->data + 9) == 17 && *(((unsigned int *) (skb->data+20)) + 1) == htons(6969)) { // *((unsigned long *) (skb->data + 28)) = rsm_jiffies; *((unsigned long *) (skb->data + 28)) = 0x00000000; *(((unsigned long *) (skb->data + 28)) + 1) = 0x00000001; *(((unsigned long *) (skb->data + 28)) + 2) = 0x00000002; *(((unsigned long *) (skb->data + 28)) + 3) = 0x00000003; *(((unsigned long *) (skb->data + 28)) + 4) = 0x00000004; *(((unsigned long *) (skb->data + 28)) + 5) = 0x00000005; } netif_rx(skb); dev->last_rx = jiffies; vp->stats.rx_packets++; } __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/