Changes:
1. This version is downloaded from
https://fast.dpdk.org/rel/dpdk-17.11.2.tar.xz.
2. Adapt the new interface `rte_ring_dequeue_burst`.
3. Change the type of `port_id` from uint8_t to uint16_t.
4. Just link libdpdk.a instead of the other libaries.
5. Install libnuma-dev first.
6. Update the documents.
There's a bug of last version, every tick, the timer will traverse all the
entries in callwheel, when lots of connections comming, the callout
process will use lots of cpu resources.
This commit fixes it, every tick, check the bucket which is hashed with current
tick, if there are entries, compare the callout tick, and invoke
callbacks.
freebsd and linux have a different "struct sockaddr".
In ff_recvmsg and ff_recvmsg, ```msg->msg_name```,which can refer to address, can be expected to be converted .
Note that this only fix the error, `divert` is still not usable, refer to #136.
If you want to use NAT, you can just use the built-in `ipfw nat`
instead.
e.g. unix socket, ipc (with APP on kernel network stack), packet from kernel network stack.
1. Add a new directive kernel_network_stack :
Syntax: kernel_network_stack on | off;
Default: kernel_network_stack off;
Context: http, server
This directive is available only when NGX_HAVE_FF_STACK is defined.
Determines whether server should run on kernel network stack or fstack.
2. Use a simpler and more effective solution to discriminate fstack fd(file descriptor, only socket for now) from kernel fd.
Since f-stack uses `rte_pktmbuf_clone` to copy mbuf to other lcores when dispatching arp packets, but it doesn't real copy the packet data. The buf_addr of pktmbuf is pointed to the same address.
The arp response packet is generated with the same mbuf from the request
packet, it just swaps the src and dst address, so the copied mbufs will also be changed.
What we need is a deep copy function, and the arp packets are really small, so deep copy will not harm performance too much.
Fix#53#111#112.
1.Both EVFILT_READ and EVFILT_WRITE are values but not flags. It needs to check whether it is equal but not to do logic and.
2.If the read direction of the socket has shutdown, then the filter also sets EV_EOF in `flags`, and returns the socket error (if any) in `fflags`.
ipfw -- interface for firewall, packet scheduler, NAT and so on.
It is comprised of several components: the kernel firewall filter rule processor and its integrated packet accounting facility, the logging facility, NAT, a forward facility, a bridge facility, and an ipstealth facility.
Note that the `dummynet` traffic shaper is not merged.
In some cases, for example, packets are forwarded to your server through
IP tunnel, and they will be received on fixed queues, since RSS doesn't support tunnels.So we need to dispatch them again.
With this commit, we can implement a dispatcher callback function and regist
it, packets retrieved from rx queue will be dispatched again according to
the dispatcher result.
For example, if you have an extra FreeBSD kernel module, and want to
compile it into F-Stack, you can do it like this:
```
cd f-stack/lib
export "KMOD_SRCS=/your/kmod/path/a.c /your/kmod/path/b.c"
export "CONF_CFLAGS=-I/your/kmod/path"
make
```
In current implementation, cores and ports are one to one mapped, this
PR allowed user to specify the core list used to handle single port. for
example cores 1,2,3 handle port 0 and cores 4,5,6 handle port 1.
- Add `port_list` config to dpdk section (used to specify the enabled port list)
- Add `lcore_list` config to port section(used to specify the core list mapped to that port)
- Delete `nb_ports` config in dpdk section
- Delete `port_mask` config in dpdk section
1.Close #22.
2.Configure the HW indirection table when initializing port.
3.Use several LSBs of the rss hash result according to reta_size when
calculating queue index.
The ring length of some NIC devices(e.g vmxnet3 ) should be
between 512-4096. We should change the TX_QUEUE_SIZE from 256 to 512
and make sure we can use the f-stack in vmxnet3.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>