Re: ports/166907: repocopy: emulators/linux_base-f10 -> emulators/linux_base-c6

2012-04-13 Thread edwin
Synopsis: repocopy: emulators/linux_base-f10 -> emulators/linux_base-c6

Responsible-Changed-From-To: freebsd-ports-bugs->emulation
Responsible-Changed-By: edwin
Responsible-Changed-When: Fri Apr 13 12:20:21 UTC 2012
Responsible-Changed-Why: 
Over to maintainer (via the GNATS Auto Assign Tool)

http://www.freebsd.org/cgi/query-pr.cgi?pr=166907
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"


[PATCH] VLAN trunking support in VirtualBox vboxnetflt

2012-04-13 Thread Landon J Fuller
Howdy,

I was looking into trunking VLANs into a virtual machine via bridging, and 
noted that transmit of 802.1q tagged packets worked from the guest VM, but upon 
reception, the VLAN tag seemed to be stripped before the packets hit the 
guest's interface.

Taking a look at the netgraph-based bridging implementation, it looks like the 
VLAN tag is not being re-inserted at the head of the ethernet frame prior to 
handing off the to VirtualBox, and VBox doesn't seem to have an equivalent 
'ether_vtag' field in its INTNETSG struct to handle this.

Thus, to preserve the VLAN tag, I modified vboxNetFltFreeBSDMBufToSG() to 
ether_vlanencap() to insert the VLAN tag before handing off to VBox. With this 
in place, I was able to successfully trunk VLANs to a virtual machine. 

Some caveats:
- If using virtio-kmod's if_vtnet, you must set vlanhwfilter (or 
promisc) flags on the guest interface before virtualbox will pass the VLAN 
tagged packets through. Otherwise, the VBox virtio-net device implementation 
will filter out the incoming packets before handing them to the VM hardware.
- VBox's em(4) host implementation does not appear to support 
'hardware' VLAN tagging, but it does declare it. If using a em(4) virtualized 
NIC, you must set -vlanhwtag on the guest interface.

I welcome someone(s) with more experience than I eyeballing the (tiny) attached 
patch. I'm also especially concerned as to whether this should be considered 
supported functionality in VBox, or I'm just getting lucky with the virtio-net 
code path.

Thanks,
Landon



patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c
Description: Binary data
___
freebsd-emulation@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-unsubscr...@freebsd.org"


Re: [PATCH] pipe2 for Linuxulator

2012-04-13 Thread Alexander Best
On Tue Apr 10 12, Jung-uk Kim wrote:
> On Tuesday 10 April 2012 07:39 pm, Jung-uk Kim wrote:
> > On Tuesday 10 April 2012 06:56 pm, Jung-uk Kim wrote:
> > > Th attached patch implements pipe2 syscall for Linuxulator, which
> > > is quite trivial.  Although it was added in Linux 2.6.27 (thanks,
> > > netchild!), it is often used by popular Linux applications, e.g.,
> > > Adobe Flash plugin.  Please note linux_pipe() was moved from MD
> > > files to sys/compat/linux/linux_file.c because both amd64 and
> > > i386 versions looked the same and I failed to see any reason.  I
> > > also changed file descriptor argument from l_ulong * to l_int *,
> > > which seemed more appropriate.  Any objections?
> >
> > Oops, I missed a patch for sys/kern/kern_descript.c:
> >
> > Index: sys/kern/kern_descrip.c
> > ===
> > --- sys/kern/kern_descrip.c (revision 234112)
> > +++ sys/kern/kern_descrip.c (working copy)
> > @@ -1681,6 +1681,8 @@ finstall(struct thread *td, struct file *fp,
> > int *
> > }
> > fhold(fp);
> > fdp->fd_ofiles[*fd] = fp;
> > +   if ((flags & O_NONBLOCK) != 0)
> > +   fp->f_flag |= FNONBLOCK;
> > if ((flags & O_CLOEXEC) != 0)
> > fdp->fd_ofileflags[*fd] |= UF_EXCLOSE;
> > FILEDESC_XUNLOCK(fdp);
> >
> > > * PS: This patch is also available from here:
> > >
> > > http://people.freebsd.org/~jkim/linux_pipe2.diff
> >
> > This patch is updated with it.
> 
> Oops, oops...  I found that non-blocking does not really work because 
> finit() resets the flag later.  The patch was re-done to set the 
> non-blocking flag correctly.
> 
> I'm really sorry about the mess.

i'm having problems with the patch. beforehand, playing music from
www.mixcloud.com worked. now the flash based player is initialising forever.

'ps alx' says the following about the npviewer.bin task:

  UID  PID PPID  CPU PRI NIVSZRSS MWCHAN   STAT TT  TIME COMMAND
 1001 1044 10340  40  0  0  0 -Z -   0:00,05 

and procstat -a says:

  PID  PPID  PGID   SID  TSID THR LOGINWCHAN EMUL  COMM
0 0 0 0 0  11 -- - kernel  
1 0 1 1 0   1 root wait  FreeBSD ELF64 init
2 0 0 0 0   1 -ccb_scan  - xpt_thrd
3 0 0 0 0   1 -psleep- pagedaemon  
4 0 0 0 0   1 -psleep- vmdaemon
5 0 0 0 0   1 -pgzero- pagezero
6 0 0 0 0   1 -psleep- bufdaemon   
7 0 0 0 0   1 -syncer- syncer  
8 0 0 0 0   1 -vlruwt- vnlru   
9 0 0 0 0   1 -sdflush   - softdepflush
   10 0 0 0 0   2 -- - idle
   11 0 0 0 0  15 -- - intr
   12 0 0 0 0   3 -- - geom
   13 0 0 0 0   1 -- - yarrow  
   14 0 0 0 0  32 -- - usb 
   15 0 0 0 0   1 -- - schedcpu
  325 1   325   325 0   1 root selectFreeBSD ELF64 
wpa_supplicant
  429 1   429   429 0   1 root selectFreeBSD ELF64 devd
  616 1   616   616 0   1 root selectFreeBSD ELF64 syslogd 
  680 1   680   680 0   1 root selectFreeBSD ELF64 powerd  
  708 1   707   707 0   1 root nanslpFreeBSD ELF64 smartd  
  713 1   713   713 0   1 root selectFreeBSD ELF64 dbus-daemon 
  725 1   725   725 0   3 root uwait FreeBSD ELF64 musicpd 
  730 1   730   730 0   1 root selectFreeBSD ELF64 mpdscribble 
  771 1   771   771 0   1 root selectFreeBSD ELF64 sendmail
  774 1   774   774 0   1 root pause FreeBSD ELF64 sendmail
  778 1   778   778 0   1 root nanslpFreeBSD ELF64 cron
  788 1   788   788 0   1 root selectFreeBSD ELF64 identd  
  816 1   816   816   816   1 arundel  wait  FreeBSD ELF64 login   
  817 1   817   817   817   1 root ttyin FreeBSD ELF64 getty   
  818 1   818   818   818   1 root ttyin FreeBSD ELF64 getty   
  819 1   819   819   819   1 root ttyin FreeBSD ELF64 getty   
  820 1   820   820   820   1 root ttyin FreeBSD ELF64 getty   
  821 1   821   821   821   1 root ttyin FreeBSD ELF64 getty   
  822 1   822   822   822   1 root ttyin FreeBSD ELF64 getty   
  823 1   823   823   823   1 root ttyin F