In the redis, the gettimeofday uses too much CPU, even using the
vdso. This patch is useful to avoid wasting CPU cycles and
improve the performance.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
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.
Other arg is mostly configure file. And this
patch will support it. User can use the configure
file specified.
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
For using the redis, we should allow users to configure
theirs configure file. Now fstack uses the options as below:
—-conf config.ini --proc-type= --proc-id=
And we should skip 4 args(including program name arg), not 3.
Use the redis-config-file:
bin/redis-server --conf config.ini \
--proc-type=primary --proc-id=0 redis-3.2.8/redis.conf
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
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>
Since f-stack run with polling mode, nginx will call gettimeofday every loop, and cost a lot.
With this commit, f-stack will update current timespec periodically in
ff_hardclock_job. And ff_gettimeofday will get this value.
In nginx, hijack gettimeofday to call ff_gettimeofday.
When use nginx as a proxy, nginx error logs always print 'readv() failed
(9: Bad file descriptor) while reading upstream'.
In previous commit: 10c5711ed2, i removed
`readv`, caused this issue.
Since ngx_ff_module.c was derived from nginx_ofp's ngx_ofp_module.c, but
according to #42, nginx_ofp's ngx_ofp_module.c may be derived from
opendp/dpdk-nginx's ans_module.c and nginx_ofp didn't have a license, so
add opendp/dpdk-nginx's license.
The newer version of libcrypto will invoke read and close function when
dl_init, the real address of read/close function can’t be determined in
compilation phase and libcrypto will seek read/close symbol in ELF
files and other libraries. However nginx_fstack redefined these two
functions, this causes these symbols to be found in nginx_fstack. But the real read/close function is NULL before ff_mod_init, this leads to crash.
Changes:
1.if real_close is NULL, assign it with the address of close function in Glibc.
2.remove unnecessary read/readv/write.