netmap: How the buf_num of buffers is used by driver and monitor app

2018-03-29 Thread Ming Fu
Hi, I am wondering about the netmap module parameters buf_num. The default buf_num 163840 seems fairly big compare to intel 10G ixgbe of max 4096 queue size. A full queue of the interface can only use a very small portion of the buf_num. Can the netmap enabled driver like ixgbe use more buffers

Netmap on Linux nm_open() fail when receive ring size is set to 4096

2018-03-28 Thread Ming Fu
Hi, I was trying netmap on a Linux box with 128G of ram (64G per numa node). If I set ixgbe interface to 4096 ring size, the nm_open will fail with error "Cannot allocate memory". What can I tweak to make the card use larger ring size? The following test was run after fresh reboot. $ ethtool -

Netmap: Build a network SPAN/TAP from netmap

2017-12-14 Thread Ming Fu
Hi, I am trying to explore the possibility to build a network SPAN/TAP from netmap. Similar to the bridge sample, but all packet going through the bridge also get copied to a SPAN port. How do I duplicate or clone an incoming packet and send the original to bridge peer and the cloned one to the

Re: netmap NETMAP_SW_RING or NETMAP_HW_RING

2012-10-17 Thread Ming Fu
code in nm_util.c } else if (ringid & NETMAP_HW_RING) { D("XXX check multiple threads"); What does it suggest? any special requirement for multi-threaded program? Regards, Ming On 10/17/2012 12:41 PM, Ming Fu wrote: Hi, What is the difference between NETMAP_SW_RING an

netmap NETMAP_SW_RING or NETMAP_HW_RING

2012-10-17 Thread Ming Fu
Hi, What is the difference between NETMAP_SW_RING and NETMAP_HW_RING. When using netmap_open() in the example code to create a netmap fdesc, one of these two need to be ORed to the queue ID, in order to bind only one RX queue. netmap code updated from FreeBSD RELENG_9. Regards, Ming __

netmap bridge.c sample code assumes the same number of tx/rx queue.

2012-07-24 Thread Ming Fu
Hi Everybody, I just want to share some work I was doing last few days trying to make use the bridge code of netmap. My netmap device has 4 receive and 1 transmit queue. I found that a ping -s 5100 10.10.10.10 through the bridge will lost fragment of the ping when the transmit queue reaches

kern/123095 kern/131602 sendfile

2010-07-07 Thread Ming Fu
Hi, I was trying to use sendfile and hit with problem very similar to the 123095 and 131602. It seems that when the file is large enough (in megs), the file can be corrupted even if it is open read-only and exist on disk as read-only file, though the filesystem is mounted read-write. I have a s

Lost fragment when send to ip that need arp resolve

2005-11-10 Thread ming fu
Hi, When sending large udp packet (larger then mtu) to an ip that need arp resolve, the first frag will be lost. The ip_output() sends out the fragments in a loop. The first frag cause an arp request and the mbuf will be hold in "struct llinfo_arp" for send after arp can be resolved. However

FreeBSD 5 ip_gre and netisr_enable=1

2005-08-25 Thread ming fu
Hi, This problem exit in some old gre.c (not a part of official freebsd) to handle wccp packets. A carefully crafted packet can cause it to deplete kernel stack and casuing a panic. It can crash a 4.2 kernel with about 200-300 repeated ip+gre header. I believe the problem appears on FreeBSD

what to replace splnet in FreeBSD 5.x?

2005-07-08 Thread ming fu
Hi, With splnet() became a no-op in sys/systm.h static __inline intrmask_tsplnet(void){ return 0; } What should I use to replace the splnet? I have a module receiving input from both ip_input() and a device that userland can write to. I guess I was cover from the ip_input() as

ipfilter and ipfw order.

2005-06-24 Thread ming fu
Hi, In the 4.x kernel, ipfilter was hardcoded before ipfw in the ip_input(). However, in the 5.x kernel, they register themselve to the pfil hook. As there isn't a priority number during the hook up, looks like who ever register first get to filter the packet first. In case I want to preserv

Re: reproductible hang with if_em

2004-09-28 Thread ming fu
I have experienced the same thing with 4.7 as well. The driver just refuse to send anymore and won't self recover. However, tcpdump on the interface will still see traffic on the network, so receive seem working. Upgrade the driver to the most up-to-date code from 4.10 tree or from Intel does n

promisc coding question

2004-09-24 Thread ming fu
Hi, in if.h #defineIFF_PROMISC0x100/* receive all packets */ #defineIFF_PPROMISC0x2/* user-requested promisc mode */ Do I have to set both on for the promisc to work? If I only need one of them, then what is the difference? Regards, Ming

PPPoE address change

2004-06-21 Thread ming fu
Hi, I was using Bell sympatico pppoe. The PPP tunnel address changes every few hours. Is there a way to let ppp to call some program so that servers and ipfw rules can be changed to adjust to the new IP. I know I can run a cron job checking the routing state every few seconds, but I want my ipf

Re: Intel 10GbE Driver committed

2004-06-17 Thread ming fu
Does this one replace the em driver? Tony Ackerman wrote: We have commited the ixgb(4) driver for Intel(R) PRO/10GbE Server Adapters to -current and -stable. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsu

FreeBSD em ether driver lockup

2004-06-16 Thread ming fu
Hi, I have experienced em driver lockup. One of a port on a multi-port Intel Gigbit card would lockup. It can be unlocked by #ifconfig em2 down #ifconfig em2 up I beleive I have been hit by the same bug reported as kern/66634 Looking through the em driver code, I noticed the watchdog functi