Re: kern/168742: detaching of ethernet adapter with configured vlans leads to panic

2012-08-07 Thread John Baldwin
On Tuesday, August 07, 2012 12:48:31 am a...@freebsd.org wrote:
> Synopsis: detaching of ethernet adapter with configured vlans leads to panic
> 
> Responsible-Changed-From-To: freebsd-bugs->freebsd-net
> Responsible-Changed-By: ae
> Responsible-Changed-When: Tue Aug 7 04:48:17 UTC 2012
> Responsible-Changed-Why: 
> Reassign.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=168742

Ugh, I thought I had fixed this in 
http://svnweb.freebsd.org/base?view=revision&revision=208212

I think the problem is the assertion is wrong.  We could add a new DETACHING
flag, but I think the simplest fix is to just remove it.  I'm not sure if a 
similar assertion in if_delmulti_ifma() should also be removed.

Index: if.c
===
--- if.c(revision 238992)
+++ if.c(working copy)
@@ -3058,19 +3058,7 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa
 {
struct ifmultiaddr *ifma;
int lastref;
-#ifdef INVARIANTS
-   struct ifnet *oifp;
 
-   IFNET_RLOCK_NOSLEEP();
-   TAILQ_FOREACH(oifp, &V_ifnet, if_link)
-   if (ifp == oifp)
-   break;
-   if (ifp != oifp)
-   ifp = NULL;
-   IFNET_RUNLOCK_NOSLEEP();
-
-   KASSERT(ifp != NULL, ("%s: ifnet went away", __func__));
-#endif
if (ifp == NULL)
return (ENOENT);
 

-- 
John Baldwin
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/120304: [netgraph] [patch] netgraph source assumes 32-bit timeval on AMD64

2012-08-07 Thread Eugene Grosbein
Hi!

This is still the problem for 9.1-PRERELEASE: ng_source is unusable for 64bit 
systems.
The patch really helps and fixes the problem for 64bit (and breaks for 32bit :-)

Perhaps, it may be improved with some #ifdef's

Eugene Grosbein
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: kern/120304: [netgraph] [patch] netgraph source assumes 32-bit timeval on AMD64

2012-08-07 Thread Eugene Grosbein
The following reply was made to PR kern/120304; it has been noted by GNATS.

From: Eugene Grosbein 
To: bug-follo...@freebsd.org, "n...@freebsd.org" 
Cc:  
Subject: Re: kern/120304: [netgraph] [patch] netgraph source assumes 32-bit
 timeval on AMD64
Date: Tue, 07 Aug 2012 19:38:08 +0700

 Hi!
 
 This is still the problem for 9.1-PRERELEASE: ng_source is unusable for 64bit 
systems.
 The patch really helps and fixes the problem for 64bit (and breaks for 32bit 
:-)
 
 Perhaps, it may be improved with some #ifdef's
 
 Eugene Grosbein
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Send traffic to itself using real NIC

2012-08-07 Thread Eugene Grosbein
Hi!

I'd like to run some stability tests for some L2-transparent
gigabit ethernet network hardware I've got.

I have one spare FreeBSD 9.1-PRERELEASE with two-ports igb(4) card
and connected both ports using my L2 hardward making a loop.

Is it possible to configure FreeBSD in such way so it would send
IP traffic for itself not via loopback interface but via igb0/igb1?

I've tried to utilize multiple FIBs:

sysctl net.add_addr_allfibs=0
ifconfig igb0 inet 10.0.0.1/24 mtu 9126
ifconfig igb1 inet 10.0.1.1/24 mtu 9126
setfib 1 route -q flush
setfib 1 route add 10.0.1.1/32 -iface igb1
setfib 2 route -q flush
setfib 2 route add 10.0.0.1/32 -iface igb0

But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no answer).

The only way I've got working is unidirectional stream of packets
generated with ng_source(4) (patched due to kern/120304) that shows me 10% 
packet loss
(using netstat -I to see how many packets got through).

I would really like using normal TCP/UDP/ICMP streams in addition of ng_source 
tests.

Eugene Grosbein
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Send traffic to itself using real NIC

2012-08-07 Thread Jacques Fourie
On Tue, Aug 7, 2012 at 3:53 PM, Eugene Grosbein  wrote:
> Hi!
>
> I'd like to run some stability tests for some L2-transparent
> gigabit ethernet network hardware I've got.
>
> I have one spare FreeBSD 9.1-PRERELEASE with two-ports igb(4) card
> and connected both ports using my L2 hardward making a loop.
>
> Is it possible to configure FreeBSD in such way so it would send
> IP traffic for itself not via loopback interface but via igb0/igb1?
>
> I've tried to utilize multiple FIBs:
>
> sysctl net.add_addr_allfibs=0
> ifconfig igb0 inet 10.0.0.1/24 mtu 9126
> ifconfig igb1 inet 10.0.1.1/24 mtu 9126
> setfib 1 route -q flush
> setfib 1 route add 10.0.1.1/32 -iface igb1
> setfib 2 route -q flush
> setfib 2 route add 10.0.0.1/32 -iface igb0
>
> But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no 
> answer).
>
> The only way I've got working is unidirectional stream of packets
> generated with ng_source(4) (patched due to kern/120304) that shows me 10% 
> packet loss
> (using netstat -I to see how many packets got through).
>
> I would really like using normal TCP/UDP/ICMP streams in addition of 
> ng_source tests.
>
> Eugene Grosbein
> ___
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

You can try using a VIMAGE enabled kernel and jails using epair(4) as
the network interface. Bridge the epair interfaces on the host to
igb0/igb1 and you should be able to communicate between the two jails
via igb0 and igb1.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Send traffic to itself using real NIC

2012-08-07 Thread Marko Zec
On Tuesday 07 August 2012 16:04:17 Jacques Fourie wrote:
> On Tue, Aug 7, 2012 at 3:53 PM, Eugene Grosbein  wrote:
> > Hi!
> >
> > I'd like to run some stability tests for some L2-transparent
> > gigabit ethernet network hardware I've got.
> >
> > I have one spare FreeBSD 9.1-PRERELEASE with two-ports igb(4) card
> > and connected both ports using my L2 hardward making a loop.
> >
> > Is it possible to configure FreeBSD in such way so it would send
> > IP traffic for itself not via loopback interface but via igb0/igb1?
> >
> > I've tried to utilize multiple FIBs:
> >
> > sysctl net.add_addr_allfibs=0
> > ifconfig igb0 inet 10.0.0.1/24 mtu 9126
> > ifconfig igb1 inet 10.0.1.1/24 mtu 9126
> > setfib 1 route -q flush
> > setfib 1 route add 10.0.1.1/32 -iface igb1
> > setfib 2 route -q flush
> > setfib 2 route add 10.0.0.1/32 -iface igb0
> >
> > But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no
> > answer).
> >
> > The only way I've got working is unidirectional stream of packets
> > generated with ng_source(4) (patched due to kern/120304) that shows me
> > 10% packet loss (using netstat -I to see how many packets got through).
> >
> > I would really like using normal TCP/UDP/ICMP streams in addition of
> > ng_source tests.
> >
> > Eugene Grosbein
> > ___
> > freebsd-net@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-net
> > To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
>
> You can try using a VIMAGE enabled kernel and jails using epair(4) as
> the network interface. Bridge the epair interfaces on the host to
> igb0/igb1 and you should be able to communicate between the two jails
> via igb0 and igb1.

There's no need to use epair at all here.  Just create a vnet jail, and assign 
one of the igb interfaces into it, done:

# jail -c name=x vnet persist
# ifconfig igb1 vnet x
# jexec x ifconfig
lo0: flags=8008 metric 0 mtu 16384
options=3
igb1: flags=8842<...> metric 0 mtu 1500 ...

Marko

___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Send traffic to itself using real NIC

2012-08-07 Thread Jason Hellenthal
On Tue, Aug 07, 2012 at 08:53:52PM +0700, Eugene Grosbein wrote:
> Hi!
> 
> I'd like to run some stability tests for some L2-transparent
> gigabit ethernet network hardware I've got.
> 
> I have one spare FreeBSD 9.1-PRERELEASE with two-ports igb(4) card
> and connected both ports using my L2 hardward making a loop.
> 
> Is it possible to configure FreeBSD in such way so it would send
> IP traffic for itself not via loopback interface but via igb0/igb1?
> 
> I've tried to utilize multiple FIBs:
> 
> sysctl net.add_addr_allfibs=0
> ifconfig igb0 inet 10.0.0.1/24 mtu 9126
> ifconfig igb1 inet 10.0.1.1/24 mtu 9126
> setfib 1 route -q flush
> setfib 1 route add 10.0.1.1/32 -iface igb1
> setfib 2 route -q flush
> setfib 2 route add 10.0.0.1/32 -iface igb0
> 
> But "setfib 1 ping -S 10.0.0.1 10.0.1.1" still runs via lo0 (and has no 
> answer).
> 
> The only way I've got working is unidirectional stream of packets
> generated with ng_source(4) (patched due to kern/120304) that shows me 10% 
> packet loss
> (using netstat -I to see how many packets got through).
> 
> I would really like using normal TCP/UDP/ICMP streams in addition of 
> ng_source tests.
> 

You could just throw a loopback plug in your adapter. All traffic going
out is going to come right back in as fast as its sent out.

Another alternative is a crossover cable from igb0 -> igb1.

-- 

 - (2^(N-1)) JJH48-ARIN



pgpkiGAIimMC8.pgp
Description: PGP signature


RE: networking perplexity

2012-08-07 Thread Dunn, George Jr
Thanks for the reply... Sorry for the delay..

10gb0 - 192.168.33.0/24
10gb1 - 192.168.32.0/24
igb0  - 152.x.x.x/24
igb3 - 192.168.34.0/24

all routed out through 152.x.x.254 gateway

rc.conf (attempted, hangs on boot):
hostname="fqdn (resolvable)"
ifconfig_igb3="inet 192.168.34.2 netmask 255.255.255.0"
ifconfig_ix0="inet 192.168.33.2 netmask 255.255.255.0"
ifconfig_ix1="inet 192.168.32.2 netmask 255.255.255.0"
ifconfig_igb0="inet 152.x.x.x netmask 255.255.255.0"
defaultrouter="152.x.x.254"
sshd_enable="YES"
firewall_enable="NO"
#firewall_type="open"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"

# Local services
zfs_enable="YES"
powerd_enable="YES"

# Network services
sshd_enable="YES"
samba_enable="YES"

# NFS
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
mountd_flags="-r"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"

# Synchronise time
ntpdate_enable="YES"
ntpdate_hosts="timeserver (fqdn)"


The workaround that works for a minute I comment out the above ugb3 config line 
and add the following in /usr/local/etc/rc.d

!/bin/csh

ifconfig igb3 inet 192.68.34.2 netmask 255.255.255.0
/etc/rc.d/routing restart


Thanks again!
Eddie

From: Julian Elischer [jul...@freebsd.org]
Sent: Tuesday, July 31, 2012 12:21 PM
To: Dunn, George Jr
Cc: freebsd-net@freebsd.org
Subject: Re: networking perplexity

On 7/31/12 7:21 AM, Dunn, George Jr wrote:
> Hi,
>
> I am running Freebsd 9 with all current updates and am having some serious 
> issues with the networking/routing stack.
>
> I have a machine that has 2 - 10gb interfaces and 2 - 1gb interfaces that I 
> wish to configure.
> The desired effect is to have all interfaces except one of the 1Gb ports to 
> be broadcast only private address spaces for running nfs.
> I have one public fully routable address.
> Trying to configure the interfaces with rc.conf I am able to get the 10gb 
> interfaces and the public working.
> However when I add in the third private address on the other 1 gb interface 
> the whole stack seems to freak. It will completely hang the boot usually 
> requiring a hard power off and single user mode to fsck to reboot.
>
> I tried to work around by placing a script in the new rc.local place to bring 
> up the last interface and fix the routing table. It will boot then but 
> shortly after (15-45 mins) I lose all connectivity again. I have tried 
> different ports on the box as well as several different switches with the 
> same result so I don't think it's a hardware issue per se.

doesn't sound particularly hairy..

can you draw a quick diag,with numbers
and then show your config files?

>
> I really just need some input! Any takers?
>
> Thanks in advance!
>
> Eddie
>
>
> ___
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"
>
>


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Send traffic to itself using real NIC

2012-08-07 Thread Eugene Grosbein
On Tue, Aug 07, 2012 at 04:33:11PM +0200, Marko Zec wrote:

> There's no need to use epair at all here.  Just create a vnet jail, and 
> assign 
> one of the igb interfaces into it, done:
> 
> # jail -c name=x vnet persist
> # ifconfig igb1 vnet x
> # jexec x ifconfig
> lo0: flags=8008 metric 0 mtu 16384
> options=3
> igb1: flags=8842<...> metric 0 mtu 1500 ...

That would be nice solution but jail(8) manual page says:
"a fairly complete file system install of FreeBSD is required"
and that seems to be pretty big overhead. Meantime, I'll try to think up
some kind of NETGRAPH mesh.

Eugene Grosbein
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Send traffic to itself using real NIC

2012-08-07 Thread Marko Zec
On Tuesday 07 August 2012 18:20:28 Eugene Grosbein wrote:
> On Tue, Aug 07, 2012 at 04:33:11PM +0200, Marko Zec wrote:
> > There's no need to use epair at all here.  Just create a vnet jail, and
> > assign one of the igb interfaces into it, done:
> >
> > # jail -c name=x vnet persist
> > # ifconfig igb1 vnet x
> > # jexec x ifconfig
> > lo0: flags=8008 metric 0 mtu 16384
> > options=3
> > igb1: flags=8842<...> metric 0 mtu 1500 ...
>
> That would be nice solution but jail(8) manual page says:
> "a fairly complete file system install of FreeBSD is required"

No, a separate filesystem is not required, that's a manpage bug.  Just try the 
above 3 commands, they really work.

cheers,

Marko


> and that seems to be pretty big overhead. Meantime, I'll try to think up
> some kind of NETGRAPH mesh.
>
> Eugene Grosbein


___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"