netdev
[Top] [All Lists]

3c59x.c modified for time measurement / code included

To: netdev@xxxxxxxxxxx, andrewm@xxxxxxxxxx
Subject: 3c59x.c modified for time measurement / code included
From: Guilhem Tardy <guilhem_tardy@xxxxxxxxx>
Date: Wed, 19 Sep 2001 06:22:05 -0700 (PDT)
Cc: greearb@xxxxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
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 <driver rcv completed> 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/

<Prev in Thread] Current Thread [Next in Thread>