Re: Processes' FIBs

2012-01-17 Thread Oliver Fromme
Kostik Belousov  wrote:
 > The patch misses compat32 bits and breaks compat32 ps/top.

Right, thank you for pointing it out!  I missed it because
I only have i386 for testing.

I've created new patch sets for releng8 and current.  These
include compat32 support and an entry for the manual page.

Would someone with amd64 please test the compat32 part?
I've been using this code on i386 for a few days without
any problems.

I've attached the patch for current below.  Both patch sets
are also available from this URL:
http://www.secnetix.de/olli/tmp/ki_fibnum/

Testing is easy:  Apply the patch, rebuild bin/ps and kernel.
Make sure that your kernel config has "options ROUTETABLES=16"
so multiple FIBs are supported.  Reboot.  Open a shell with
setfib, e.g. "setfib 3 /bin/sh" (no root required), type
"ps -ax -o user,pid,fib,command" or something similar, and
verify that the shell process and its children are listed
with the correct FIB.  When testing on amd64, use both the
native ps and an i386 binary.

Thank you very much!

Best regards
  Oliver

--- sys/sys/user.h.orig 2011-11-07 22:13:19.0 +0100
+++ sys/sys/user.h  2012-01-17 11:33:59.0 +0100
@@ -83,7 +83,7 @@
  * it in two places: function fill_kinfo_proc in sys/kern/kern_proc.c and
  * function kvm_proclist in lib/libkvm/kvm_proc.c .
  */
-#defineKI_NSPARE_INT   9
+#defineKI_NSPARE_INT   8
 #defineKI_NSPARE_LONG  12
 #defineKI_NSPARE_PTR   6
 
@@ -186,6 +186,7 @@
 */
charki_sparestrings[50];/* spare string space */
int ki_spareints[KI_NSPARE_INT];/* spare room for growth */
+   int ki_fibnum;  /* Default FIB number */
u_int   ki_cr_flags;/* Credential flags */
int ki_jid; /* Process jail ID */
int ki_numthreads;  /* XXXKSE number of threads in total */
--- sys/kern/kern_proc.c.orig   2012-01-15 19:47:24.0 +0100
+++ sys/kern/kern_proc.c2012-01-17 12:52:36.0 +0100
@@ -836,6 +836,7 @@
kp->ki_swtime = (ticks - p->p_swtick) / hz;
kp->ki_pid = p->p_pid;
kp->ki_nice = p->p_nice;
+   kp->ki_fibnum = p->p_fibnum;
kp->ki_start = p->p_stats->p_start;
timevaladd(&kp->ki_start, &boottime);
PROC_SLOCK(p);
@@ -1121,6 +1122,7 @@
bcopy(ki->ki_comm, ki32->ki_comm, COMMLEN + 1);
bcopy(ki->ki_emul, ki32->ki_emul, KI_EMULNAMELEN + 1);
bcopy(ki->ki_loginclass, ki32->ki_loginclass, LOGINCLASSLEN + 1);
+   CP(*ki, *ki32, ki_fibnum);
CP(*ki, *ki32, ki_cr_flags);
CP(*ki, *ki32, ki_jid);
CP(*ki, *ki32, ki_numthreads);
--- sys/compat/freebsd32/freebsd32.h.orig   2011-11-11 08:17:00.0 
+0100
+++ sys/compat/freebsd32/freebsd32.h2012-01-17 11:34:00.0 +0100
@@ -319,6 +319,7 @@
charki_loginclass[LOGINCLASSLEN+1];
charki_sparestrings[50];
int ki_spareints[KI_NSPARE_INT];
+   int ki_fibnum;
u_int   ki_cr_flags;
int ki_jid;
int ki_numthreads;
--- bin/ps/keyword.c.orig   2011-09-29 08:31:42.0 +0200
+++ bin/ps/keyword.c2012-01-17 12:54:49.0 +0100
@@ -85,6 +85,7 @@
{"etimes", "ELAPSED", NULL, USER, elapseds, 0, CHAR, NULL, 0},
{"euid", "", "uid", 0, NULL, 0, CHAR, NULL, 0},
{"f", "F", NULL, 0, kvar, KOFF(ki_flag), INT, "x", 0},
+   {"fib", "FIB", NULL, 0, kvar, NULL, 2, KOFF(ki_fibnum), INT, "d", 0},
{"flags", "", "f", 0, NULL, 0, CHAR, NULL, 0},
{"gid", "GID", NULL, 0, kvar, KOFF(ki_groups), UINT, UIDFMT, 0},
{"group", "GROUP", NULL, LJUST, egroupname, 0, CHAR, NULL, 0},
--- bin/ps/ps.1.orig2011-11-22 22:53:06.0 +0100
+++ bin/ps/ps.1 2012-01-17 12:56:17.0 +0100
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD: src/bin/ps/ps.1,v 1.112 2011/11/22 21:53:06 trociny Exp $
 .\"
-.Dd November 22, 2011
+.Dd January 17, 2012
 .Dt PS 1
 .Os
 .Sh NAME
@@ -506,6 +506,9 @@
 minutes:seconds.
 .It Cm etimes
 elapsed running time, in decimal integer seconds
+.It Cm fib
+default FIB number, see
+.Xr setfib 1
 .It Cm flags
 the process flags, in hexadecimal (alias
 .Cm f )
___
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/155604: [flowtable] Flowtable excessively caches dest MAC addresses for outgoing traffic

2012-01-17 Thread glebius
Synopsis: [flowtable] Flowtable excessively caches dest MAC addresses for 
outgoing traffic

Responsible-Changed-From-To: freebsd-net->kmacy
Responsible-Changed-By: glebius
Responsible-Changed-When: Tue Jan 17 14:10:55 UTC 2012
Responsible-Changed-Why: 
Over to author of flowtable.

http://www.freebsd.org/cgi/query-pr.cgi?pr=155604
___
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: bge0 interface seen but not working

2012-01-17 Thread John Baldwin
On Saturday, January 14, 2012 5:53:58 pm YongHyeon PYUN wrote:
> On Sat, Jan 14, 2012 at 08:55:51AM -0800, Bill Norton wrote:
> > Greetings,
> > 
> > I posted this on the pc-bsd forum and was directed here.?
> > 
> > I installed the latest 8.X and the interface worked fine.?
> > 
> > Yesterday, I did a clean install of 9.0.?
> > 
> > The issue is that the bge0 interface is not working.?
> > It is seen by the kernel(ifconfig shows it) but just won't ping.
> > I have tried dhcp and a static address.?
> > I used a backtrack live cd and this worked fine.?
> > 
> 
> Probably disabling MSI will workaround your issue. Add
> 
> hw.pci.enable_msi="0"
> 
> to /boot/loader.conf.
> 
> > 
> > I did find this bug below but it seemed to only affect 8.2
> > 
> > The bge(4) Ethernet driver has a known issue where the interface is seen 
but does not respond to networking requests. A patch is available for 8.2 (see 
155442) and the driver will be fixed in 8.3.
> > 
> > Any ideas??
> > 
> 
> I thought it was already fixed by John but it seems it is not.
> John, would you take a look?(NVIDIA HT MSI issue)?

It is not fully resolved.  9 has some different changes, but those changes 
broke other systems.  It seems MSI on NVIDIA HT systems requires a lot of 
extra quirks to actually work.

-- 
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"


PPP to UMTS provider && incoming traffic (TCP, UDP)

2012-01-17 Thread Matthias Apitz

Hello,

I'm used to connect my FreeBSD 10-CURRENT netbook to Internet via PPP;
the provider in question is a German O2 UMTS provider; so far so good,
i.e. all is working as it should: outbound HTTP, SSH, SMTP (I'm just
sending this mail through such a connection), ...

what does not work is VoIP; the call is established via SIP (using a
STUN server), but remote audio RTP packages are not coming down; I
checked this with TCPDUMP: only upstream RTP is send, no incoming UDP;

as well I checked incoming TCP, for example incoming SSH or HTTP; it
seems that incoming UCP/TCP is just not coming through the PPP link;

before bother (complain) the provider with this, I wanted to ask if I
miss something in the PPP configuration to get incoming delivered;

note: I'm not talking about NAT to some stations on a LAN, I just want
get IP to the local host (interface tun6); as well I disabled ipf(8)
which I have configured normaly;

any ideas? thanks in advance

matthias
-- 
Matthias Apitz
e  - w http://www.unixarea.de/
UNIX since V7 on PDP-11, UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2, FreeBSD since 2.2.5
___
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: bge0 interface seen but not working

2012-01-17 Thread YongHyeon PYUN
On Tue, Jan 17, 2012 at 10:12:23AM -0500, John Baldwin wrote:
> On Saturday, January 14, 2012 5:53:58 pm YongHyeon PYUN wrote:
> > On Sat, Jan 14, 2012 at 08:55:51AM -0800, Bill Norton wrote:
> > > Greetings,
> > > 
> > > I posted this on the pc-bsd forum and was directed here.?
> > > 
> > > I installed the latest 8.X and the interface worked fine.?
> > > 
> > > Yesterday, I did a clean install of 9.0.?
> > > 
> > > The issue is that the bge0 interface is not working.?
> > > It is seen by the kernel(ifconfig shows it) but just won't ping.
> > > I have tried dhcp and a static address.?
> > > I used a backtrack live cd and this worked fine.?
> > > 
> > 
> > Probably disabling MSI will workaround your issue. Add
> > 
> > hw.pci.enable_msi="0"
> > 
> > to /boot/loader.conf.
> > 
> > > 
> > > I did find this bug below but it seemed to only affect 8.2
> > > 
> > > The bge(4) Ethernet driver has a known issue where the interface is seen 
> but does not respond to networking requests. A patch is available for 8.2 
> (see 
> 155442) and the driver will be fixed in 8.3.
> > > 
> > > Any ideas??
> > > 
> > 
> > I thought it was already fixed by John but it seems it is not.
> > John, would you take a look?(NVIDIA HT MSI issue)?
> 
> It is not fully resolved.  9 has some different changes, but those changes 
> broke other systems.  It seems MSI on NVIDIA HT systems requires a lot of 
> extra quirks to actually work.
> 

Ok, to mitigate the issue, I introduced a tunable that disables
MSI.

Thanks.
___
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: PPP to UMTS provider && incoming traffic (TCP, UDP)

2012-01-17 Thread Maciej Milewski
Dnia wtorek, 17 stycznia 2012 20:08:48 Matthias Apitz pisze:
> Hello,
> 
> I'm used to connect my FreeBSD 10-CURRENT netbook to Internet via PPP;
> the provider in question is a German O2 UMTS provider; so far so good,
> i.e. all is working as it should: outbound HTTP, SSH, SMTP (I'm just
> sending this mail through such a connection), ...
> 
> what does not work is VoIP; the call is established via SIP (using a
> STUN server), but remote audio RTP packages are not coming down; I
> checked this with TCPDUMP: only upstream RTP is send, no incoming UDP;
I observed similar problem with L2TP VPN and for me it looks that they are 
blocking incoming/returning UDP traffic in public APN.
On the server side I see both incoming and outgoing traffic but device 
complains that it's unable to connect. If I switch to local wireless network 
then everthing works fine. I suspect that's because they are selling 
special(money) APNs.

> as well I checked incoming TCP, for example incoming SSH or HTTP; it
> seems that incoming UCP/TCP is just not coming through the PPP link;
> 
> before bother (complain) the provider with this, I wanted to ask if I
> miss something in the PPP configuration to get incoming delivered;
> 
> note: I'm not talking about NAT to some stations on a LAN, I just want
> get IP to the local host (interface tun6); as well I disabled ipf(8)
> which I have configured normaly;
> 
> any ideas? thanks in advance
> 
>   matthias
--
Maciej Milewski
___
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"


Broadcom 10Gbps Ethernet driver (bxe)

2012-01-17 Thread Mike Karels
Has anyone had any success using the bxe driver with FreeBSD 9.0 or
pre-releases?  If so, are you using BCM57710 or BCM57711[E]?  We are
trying to use the 57710 without any success; it does not receive
unicast packets, just broadcast or multicast.

Thanks,
Mike
___
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/164265: [netinet] [patch] tcp_lro_rx computes wrong checksum if 'csum' variable is 0

2012-01-17 Thread linimon
Old Synopsis: tcp_lro_rx computes wrong checksum if 'csum' variable is 0
New Synopsis: [netinet] [patch] tcp_lro_rx computes wrong checksum if 'csum' 
variable is 0

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: linimon
Responsible-Changed-When: Wed Jan 18 01:06:41 UTC 2012
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=164265
___
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: PPP to UMTS provider && incoming traffic (TCP, UDP)

2012-01-17 Thread Matthias Apitz
El día Tuesday, January 17, 2012 a las 11:43:15PM +0100, Maciej Milewski 
escribió:

> Dnia wtorek, 17 stycznia 2012 20:08:48 Matthias Apitz pisze:
> > Hello,
> > 
> > I'm used to connect my FreeBSD 10-CURRENT netbook to Internet via PPP;
> > the provider in question is a German O2 UMTS provider; so far so good,
> > i.e. all is working as it should: outbound HTTP, SSH, SMTP (I'm just
> > sending this mail through such a connection), ...
> > 
> > what does not work is VoIP; the call is established via SIP (using a
> > STUN server), but remote audio RTP packages are not coming down; I
> > checked this with TCPDUMP: only upstream RTP is send, no incoming UDP;
> I observed similar problem with L2TP VPN and for me it looks that they are 
> blocking incoming/returning UDP traffic in public APN.
> On the server side I see both incoming and outgoing traffic but device 
> complains that it's unable to connect. If I switch to local wireless network 
> then everthing works fine. I suspect that's because they are selling 
> special(money) APNs.

Thanks for your feedback; I think too, that UDP downstream is blocked if
there is not upstream UDP initialized for the same socket pair; and VoIP
is using different UDP ports for up- and downstream media (audio).

What I'm wondering is, how does Skype works (which is fine with my UMTS
provider at the same time), have to check this with TCPDUMP...

matthias
-- 
Matthias Apitz
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e  - w http://www.unixarea.de/
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
___
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"