-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
f-stack client fails to establish TCP connections #624
Comments
我基于main_epoll.c例子,编写了一个基于epoll的异步tcp客户端,是可以连接成功-发送接收数据-正常关闭。 |
any chance you could share your code and the way you establish the connection? |
any chance you could share your code and the way you establish the connection?Please |
可以分享一下代码吗
|
@jiangxiaosheng 能分享下例子吗 |
I capture all the package from client and server, client send SYN to server and server reply a message, but client send SYN again with tcpdump; but bind certain port can establish tcp connection; |
@Chithesus Can you show me the code? I tried to bind certain port but still didn't working. ` memset(&client_addr, 0, sizeof(client_addr));
` |
Thanks for your mail.邮件已收,谢谢
|
@tinboxw Can you share the code? |
I fixed it, we should disable kni in config.ini Below is the code implement a client `#include <stdio.h> #include "ff_config.h" #define SERVER_IP "101.32.223.170" #define SERVER_PORT 12345 static struct epoll_event ev, events[MAX_EVENTS];
#ifdef STANDARD int main(int argc, char *argv[]) { #ifdef STANDARD #ifdef STANDARD #ifdef STANDARD
#ifndef STANDARD
#ifdef STANDARD #ifdef STANDARD
#ifdef STANDARD #ifdef STANDARD
#ifdef STANDARD cleanup: |
Hi,
To understand the performance benefits of f-stack, I started with a simple application where a client interacts with a server via TCP. Both client and server run on aws ec2 instances, each having two NICs where one for kernel driver and another for DPDK driver.
I followed the helloworld example to write a f-stack server, and it works as expected. However, the f-stack client cannot connect to any server (neither my f-stack server nor others). In particular,
ff_connect
failed and the socket gets blocked in SYN_SENT state.To figure out the reason, I tested normal client and server (based on kernel stack) as well. When running normal client/server with f-stack server/client, I can track the tcp packages on normal ones to help understand the behavior of f-stack client (while currently I can only see the byte-level traffic of the DPDK NIC on ec2 instance using f-stack tools without high-level semantics, that's why I need normal client/server). Anyway, it turns out that the server can receive the SYN package from f-stack client and send out SYN_ACK, while the latter fails to receive SYN_ACK and always re-sends SYN to the server.
I feel that the problem can either come from routing issues or the f-stack client somehow dropping the package. To exclude the routing issue, I inspected the client-side traffic of both NICs, and found the DPDK NIC DID receive packages during the tcp handshake (based on
rx packets
andrx bytes
fromtraffic
command) and there is no package coming into the kernel NIC (so the routing might be correct). I thus doubt the second reason might be more possible.Still, I'm not sure if my understanding is correct and how can I fix my problem. Here are a couple of questions. If I can inspect more package-level information (like
tcpdump
) with f-stack tools, instead of only the numbers of bytes and packages received and sent? If the f-stack client does drop the package, why it might happen and how can I solve this?Any help will be greatly appreciated. Let me know in case more details are required.
The text was updated successfully, but these errors were encountered: