reproductible hang with if_em

2004-09-27 Thread Pierre Beyssac
Hello,

I'm having a problem (under 5.3-BETA, but I don't think it matters
much) with the if_em driver on bursty outbound traffic: the card
is stuck in a state where it only returns ENOBUFS.  No buffers ever
become available again, but ifconfig down+up fixes the problem.

>From a quick analysis it looks like the TX descriptor cleanup routine
em_clean_transmit_interrupts() as called by em_encap() in such cases
doesn't manage to find anything free with E1000_TXD_STAT_DD set.
The card seems stuck in this state. A simple albeit dirty fix would
be to cancel some or all untransmitted packets in such cases.

Perhaps this is related to my using the card on a 100Mbps switch.
I have a small program to exercise the hang in case someone would
like to have a look at it.

See below for the result of "sysctl hw.em0.debug_info=1" (notice
the not avail1 = 12 and not avail2 = 0 hinting at
em_clean_transmit_interrupts).

em0: [MPSAFE]
em0: bpf attached
em0: Ethernet address: 00:0d:56:d0:5c:15
em0:  Speed:N/A  Duplex:N/A
em0: Link is up 100 Mbps Full Duplex
em0: Adapter hardware address = 0xc3570b34 
em0:tx_int_delay = 66, tx_abs_int_delay = 66
em0:rx_int_delay = 0, rx_abs_int_delay = 66
em0: fifo workaround = 0, fifo_reset = 0
em0: hw tdh = 238, hw tdt = 238
em0: Num Tx descriptors avail = 256
em0: Tx Descriptors not avail1 = 12
em0: Tx Descriptors not avail2 = 0
em0: Std mbuf failed = 0
em0: Std mbuf cluster failed = 0
em0: Driver dropped packets = 0

-- 
Pierre Beyssac  [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: (KAME-snap 8803) Re: Weird memory exhaustion with FreeBSD 4.10-STABLE

2004-09-27 Thread JINMEI Tatuya / 神明達哉
> On Mon, 27 Sep 2004 07:57:02 +0300 (EEST), 
> Pekka Savola <[EMAIL PROTECTED]> said:

>> I can think of several possibilities that may cause the entries:
>> 
>> - when this node sends ICMPv6 error messages to those addresses, it
>> can create route entries.  I suspect this is the main reason since
>> in this case the destination of route entries would contain other
>> types of addresses than 6to4.  You can (implicitly) check if this
>> happened by looking at the result of 'netstat -s -p icmp6'

> This is likely the case.  Due to Microsoft's implementation of '6to4 
> relay probing', each host tries to send an IPv6 packet of Hop Count=1, 
> which results in an ICMP unreachable back from the relays.  See below.

Okay.  Now I think I figure out the problem.  Those host routes were
created not deliberately, so the kernel will eventually need a fix to
this.

But if you are in a hurry and/or cannot replace the kernel soon, I
think setting net.inet6.ip6.rtexpire to 0 can be a workaround (with
this you even do not have to reboot the kernel - though rebooting may
also help if you can).

JINMEI, Tatuya
Communication Platform Lab.
Corporate R&D Center, Toshiba Corp.
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Patch for fragment problem in key.c

2004-09-27 Thread George V. Neville-Neil
Hi Folks,

Robert Watson tried to send email about this but it never got
through, and then Sam Leffler got ahold of me and told me he
fixed something similar in the FAST_IPSEC code.  So, the
following patch fixes, in KAME IPSec.  This patch was
generated against 6.0-CURRENT and I included Sam's commit
message.

Later,
George

Correct handling of SADB_UPDATE and SADB_ADD requests.  key_align may split
the mbuf due to use of m_pulldown.  Discarding the result because of this
does not make sense as no subsequent code depends on the entire msg being
linearized (only the individual pieces).  It's likely something else is wrong
here but for now this appears to get things back to a working state.

Index: sys/netkey/key.c
===
RCS file: /Volumes/exported/FreeBSD-CVS/src/sys/netkey/key.c,v
retrieving revision 1.67
diff -u -r1.67 key.c
--- sys/netkey/key.c2 Sep 2004 20:14:03 -   1.67
+++ sys/netkey/key.c27 Sep 2004 16:08:31 -
@@ -6952,11 +6952,6 @@
if (error)
return error;
 
-   if (m->m_next) {/*XXX*/
-   m_freem(m);
-   return ENOBUFS;
-   }
-
msg = mh.msg;
 
/* check SA type */
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


q?

2004-09-27 Thread Roman Stadnik


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"