Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Dec 2014 18:09:42 +1100 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Martin Hanson <greencoppermine@yandex.com>
Cc:        Warren Block <wblock@wonkity.com>, freebsd-net@freebsd.org
Subject:   Re: NICs devices switches "pshycial" place on each boot
Message-ID:  <20141204180007.Q85722@sola.nimnet.asn.au>
In-Reply-To: <2704971417669266@web25m.yandex.ru>
References:  <1511041417624247@web23g.yandex.ru> <alpine.BSF.2.11.1412031024340.32996@wonkity.com> <212351417642134@web20h.yandex.ru> <alpine.BSF.2.11.1412031601220.13301@wonkity.com> <2659291417665100@web17m.yandex.ru> <alpine.BSF.2.11.1412032119080.86447@wonkity.com> <2704971417669266@web25m.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 4 Dec 2014 06:01:06 +0100, Martin Hanson wrote:
(Warren Block wrote:)
> I would use three of these sections, one with the serial number of each
> interface.  So:
>
> action "ifconfig $device-name name wan inet ..."
> action "ifconfig $device-name name dmz inet ..."
> action "ifconfig $device-name name lan inet ..."
>
> Then the interface names can be easily used in firewall settings.

Hmm, pine doesn't quote your message properly, I'll try something else:

=======
I tried that as well, but $device-name is empty.

If I do this:

notify 1000 {
     match "system" "USB";
     match "subsystem" "INTERFACE";
     match "vendor" "0x0b95";
     match "product" "0x1790";
     match "sernum" "0000249B0DE00C";
     match "type" "ATTACH";
     action "logger DEVICE NAME IS: $device-name.";
};
=======

Maybe devd does'nt parse quite the same as sh(1), in that your trailing 
'.' might be seen as part of the name to match?  Tried leaving it off?

========
I get:

<SNIP>
Dec  4 05:44:14 gateway1 kernel: ugen7.2: <ASIX Elec. Corp.> at usbus7
Dec  4 05:44:14 gateway1 kernel: axge0: <NetworkInterface> on usbus7
Dec  4 05:44:14 gateway1 devd: Executing 'logger DEVICE NAME IS: .!'
Dec  4 05:44:14 gateway1 martin: DEVICE NAME IS: .!
Dec  4 05:44:15 gateway1 kernel: miibus1: <MII bus> on axge0
Dec  4 05:44:15 gateway1 kernel: rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 3 on miibus1
Dec  4 05:44:15 gateway1 kernel: rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
Dec  4 05:44:15 gateway1 kernel: ue0: <USB Ethernet> on axge0
Dec  4 05:44:15 gateway1 kernel: ue0: Ethernet address: 00:24:9b:0d:e0:0c
Dec  4 05:44:15 gateway1 devd: Executing '/etc/pccard_ether ue0 start'
Dec  4 05:44:15 gateway1 kernel: ue0: link state changed to DOWN
</SNIP>

Notice the "Dec  4 05:44:14 gateway1 martin: DEVICE NAME IS: .!" part.
=======

See above maybe, but then, where did that trailing '!' come from?

cheers, Ian
From owner-freebsd-net@FreeBSD.ORG  Thu Dec  4 10:50:49 2014
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
Delivered-To: freebsd-net@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id B367FF99
 for <freebsd-net@freebsd.org>; Thu,  4 Dec 2014 10:50:49 +0000 (UTC)
Received: from relay1.speechpro.com (relay1.speechpro.com [79.134.214.22])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5B166ED0
 for <freebsd-net@freebsd.org>; Thu,  4 Dec 2014 10:50:48 +0000 (UTC)
Received: from mail.stc ([192.168.8.64] helo=spb2.speechpro.com)
 by relay1.speechpro.com with esmtp (Exim 4.80.1 (FreeBSD))
 (envelope-from <tabolin@speechpro.com>) id 1XwTza-000JcP-BV
 for freebsd-net@freebsd.org; Thu, 04 Dec 2014 13:50:38 +0300
Received: from [192.168.6.123] by mail.stc with esmtp (Exim 4.80.1 (FreeBSD))
 (envelope-from <tabolin@speechpro.com>) id 1XwTzR-000DC0-PC
 for freebsd-net@freebsd.org; Thu, 04 Dec 2014 13:50:29 +0300
Message-ID: <54803C75.2020300@speechpro.com>
Date: Thu, 04 Dec 2014 13:50:29 +0300
From: Yuriy Tabolin <tabolin@speechpro.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:31.0) Gecko/20100101 Thunderbird/31.0
MIME-Version: 1.0
To: freebsd-net@freebsd.org
Subject: problem with 9k jumbo clusters
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Archived: Yes
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/>;
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
 <mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2014 10:50:49 -0000

Hi All.
I have a server with two Intel 10G NIC. OS FreeBSD 10.1-Release amd64. 
Server works like NFS, samba-server and iSCSI target. Both NICs 
aggregated into lagg device and set MTU 9014 to them. There are some 
tuning sysctl.conf:
kern.maxfiles=6289601
kern.maxfilesperproc=5660640
kern.maxvnodes=3339565
kern.ipc.nmbclusters=12255588
kern.ipc.nmbjumbop=6127794
kern.ipc.nmbufs=78435780
kern.ipc.maxsockbuf=16777216
kern.ipc.maxsockets=6289600
net.inet.tcp.sendbuf_max=16777216
net.inet.tcp.sendspace=65536
net.inet.tcp.recvbuf_max=16777216
net.inet.tcp.recvspace=65536

After some days of working, the errors are appearing:
ix1: Interface stopped DISTRIBUTING, possible flapping
ix0: Interface stopped DISTRIBUTING, possible flapping
ix0: Could not setup receive structures
ix1: Could not setup receive structures

After that errors the NICs stoped working. netstat -m shows:
32881/33854/66735 mbufs in use (current/cache/total)
16370/8198/24568/12255588 mbuf clusters in use (current/cache/total/max)
16370/4807 mbuf+clusters out of packet secondary zone in use (current/cache)
0/873/873/6127794 4k (page size) jumbo clusters in use 
(current/cache/total/max)
16383/21517/37900/1815641 9k jumbo clusters in use (current/cache/total/max)
0/0/0/1021298 16k jumbo clusters in use (current/cache/total/max)
188407K/222004K/410411K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters delayed (4k/9k/16k)
0/101414306/0 requests for jumbo clusters denied (4k/9k/16k)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile

9k jumbo clusters max is too big, but looks like system cannot allocate 
them. There are huge number of "9k requests for jumbo clusters denied". 
ifconfig ix down/up don't helped, reboot is needed. Thanks for any help!


--
Best regards,
Tabolin Yuriy
System administrator
Speech Technology Center



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141204180007.Q85722>