netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: figo zhang <figo1802@gmail.com>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: Dick Hollenbeck <dick@softplc.com>,
	netdev@vger.kernel.org, zealcook@gmail.com
Subject: Re: KS8695: possible NAPI issue
Date: Mon, 8 Mar 2010 17:04:09 +0800	[thread overview]
Message-ID: <c6ed1ac51003080104l4d67d72aybd3909ac12b54e3b@mail.gmail.com> (raw)
In-Reply-To: <f69abfc31003050700y57718a6aje3c1ff41d04748ae@mail.gmail.com>

2010/3/5 Yegor Yefremov <yegorslists@googlemail.com>:
>>> My tests look like following:
>>>
>>> 1. system start
>>> 2. ping one host: O.K.
>>> 3. nc -l -p 5000 > /var/test (about 1Mb): O.K.
>>> 4. ping the same host: failed
>> 1. type "arp" command, see the arp is exit or expire?
>
> debian:~# nc -l -p 5000 > /var/zImage
>
> debian:~# ping -c 1 192.168.1.38
>
> PING 192.168.1.38 (192.168.1.38) 56(84) bytes of data.
>
> From 192.168.1.66 icmp_seq=1 Destination Host Unreachable
>
>
>
> --- 192.168.1.38 ping statistics ---
>
> 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
>
>
>
> debian:~# arp
>
> Address                  HWtype  HWaddress           Flags Mask            Iface
> 192.168.1.38          (incomplete)                              eth0
>
> 192.168.1.36             ether   00:10:18:39:19:aa   C                     eth0
>
>
>> 2. at this point, see is it still have RX interrpt and receive packet in
>> ks8695_rx()? (in some watchpoint add printk).
>
> I've inserted some printks and I can see that interrupts are coming
> and the received count will be increased. I can also see my system
> sending arp requests. Even this ping request is visible in wireshark
> and its reply, but the ping utility sees nothing of it.
>

when you netcat finished, it cannot ping, right? at this point, would
you like to add some printk at RX and TX?
i want to see the target board have send arp packet, or have receive
arp reply packet.

you can add such funtion to print the packet buffer:

void print_mem(unsigned char *p,u32 len, u8 * s)
{
	u32 i;
	printk("  %s   ram addr = %x , data len = %x",s, p, len);

	for (i=0;i<len;i++) {
		if (0==i%16) {
			printk("\n  0x%02x : ",(p+i));
		}
		printk("%02x",*(u8 *)(p+i));
		printk(" ");
	}
	printk("\n\n");
}

for TX: ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)

=>
    	ksp->tx_ring[buff_n].status =
		cpu_to_le32(TDES_IC | TDES_FS | TDES_LS |
			    (skb->len & TDES_TBS));

	print_mem(skb->data, skb->len, "tx");

	wmb();

for RX: static int ks8695_rx(struct ks8695_priv *ksp, int budget)
=>
  			/* Retrieve the sk_buff */
			skb = ksp->rx_buffers[buff_n].skb;

			print_mem(skb->data, skb->len, "rx");

			/* Clear it from the ring */
			ksp->rx_buffers[buff_n].skb = NULL;

  parent reply	other threads:[~2010-03-08  9:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 12:04 KS8695: possible NAPI issue Yegor Yefremov
2010-03-02 14:09 ` Dick Hollenbeck
2010-03-03  1:46   ` figo zhang
2010-03-03  5:01     ` Dick Hollenbeck
2010-03-03  8:28       ` Yegor Yefremov
2010-03-04 10:10     ` Yegor Yefremov
2010-03-05  6:54       ` figo zhang
2010-03-05 10:06         ` Yegor Yefremov
2010-03-05 13:52           ` Figo.zhang
2010-03-05 15:03             ` Yegor Yefremov
2010-03-05 14:07           ` Figo.zhang
2010-03-05 15:00             ` Yegor Yefremov
2010-03-05 16:22               ` Stephen Hemminger
2010-03-06  2:40                 ` Figo.zhang
2010-03-08  9:04               ` figo zhang [this message]
2010-03-08 14:10                 ` Yegor Yefremov
2010-03-08 14:11                   ` Yegor Yefremov
2010-03-09  1:50                     ` figo zhang
2010-03-15  9:19                       ` Yegor Yefremov
2010-08-04 14:40                         ` Yegor Yefremov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6ed1ac51003080104l4d67d72aybd3909ac12b54e3b@mail.gmail.com \
    --to=figo1802@gmail.com \
    --cc=dick@softplc.com \
    --cc=netdev@vger.kernel.org \
    --cc=yegorslists@googlemail.com \
    --cc=zealcook@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).