Re: [vpp-dev] Reg Failure in make pkg-rpm with stable/2206 branch

2022-07-11 Thread 2595676015a
The default python version of centos is python2, you need to link python to 
python3, then you need to change some config so that you can use yum normarly.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21641): https://lists.fd.io/g/vpp-dev/message/21641
Mute This Topic: https://lists.fd.io/mt/92105557/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #epoll problems with epoll

2022-05-02 Thread 2595676015a
[Edited Message Follows]

Hi, Florin,
I'm using epoll with LDP, but sometimes I receive EPOLLRDHUP|EPOLLHUP 
unexpectedly when the opposite side didn't send the FIN or RST packet. Here is 
my vcl config, am Iconfiguring something wrong? Thank you very much for your 
help.

* 

vcl {

rx-fifo-size 3000

tx-fifo-size 3000

app-scope-local

event-queue-size 32000

app-socket-api /var/run/vpp/app_ns_sockets/default

}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21333): https://lists.fd.io/g/vpp-dev/message/21333
Mute This Topic: https://lists.fd.io/mt/90853811/21656
Mute #epoll:https://lists.fd.io/g/vpp-dev/mutehashtag/epoll
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #epoll problems with epoll

2022-05-02 Thread 2595676015a
[Edited Message Follows]

Hi, Florin,
I'm using epoll with LDP, but sometimes I receive EPOLLRDHUP|EPOLLHUP 
unexpectedly when the opposite side didn't send the FIN packet. Here is my vcl 
config, am Iconfiguring something wrong? Thank you very much for your help.

* 

vcl {

api-socket-name /run/vpp/api.sock

rx-fifo-size 3000

tx-fifo-size 3000

app-scope-local

app-scope-global

event-queue-size 32000

app-socket-api /var/run/vpp/app_ns_sockets/default

}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21333): https://lists.fd.io/g/vpp-dev/message/21333
Mute This Topic: https://lists.fd.io/mt/90853811/21656
Mute #epoll:https://lists.fd.io/g/vpp-dev/mutehashtag/epoll
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #epoll problems with epoll

2022-05-02 Thread 2595676015a
Hi, Florin,
I'm using epoll with LDP, but sometimes I receive EPOLLRDHUP|EPOLLHUP 
unexpectedly when the opposite side didn't send the FIN packet. Here is my vcl 
config, am Iconfiguring something wrong? Thank you very much for your help.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21333): https://lists.fd.io/g/vpp-dev/message/21333
Mute This Topic: https://lists.fd.io/mt/90853811/21656
Mute #epoll:https://lists.fd.io/g/vpp-dev/mutehashtag/epoll
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-27 Thread 2595676015a
Hi, Florin Coras

I found out that because I run the next program right next to the last one, the 
VCL didn't clear the last connection, so I get stuck in the socket function. 
Thanks a lot.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21291): https://lists.fd.io/g/vpp-dev/message/21291
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #vpp-hoststack how to change tcp congestion algorithm

2022-04-27 Thread 2595676015a
On Wed, Apr 27, 2022 at 01:52 PM, Florin Coras wrote:

> 
> I wouldn’t recommend it, but if you must change it, in vpp’s startup.conf
> add a tcp stanza with cc-algo set to newreno: tcp { cc-algo newreno }

Thanks a lot. Actually, I want to customize a TCP congestion algorithm.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21290): https://lists.fd.io/g/vpp-dev/message/21290
Mute This Topic: https://lists.fd.io/mt/90725025/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #vpp-hoststack how to change tcp congestion algorithm

2022-04-26 Thread 2595676015a
Hi All,
I have read the src code of TCP.  I found that if I want to switch tcp 
congestion algorithm between newreno and cubic, the only way is to modify the 
src code. May I ask if my understanding is correct? Thank you very much.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21288): https://lists.fd.io/g/vpp-dev/message/21288
Mute This Topic: https://lists.fd.io/mt/90725025/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #socket-api get stuck in socket function

2022-04-26 Thread 2595676015a
Thanks, I'm using LDP. When I use gdb to debug, it comes out with output as 
follows.
I guess LDP recovers some libraries that gdb needs. When I switch to normal 
env, gdb runs correctly. How can I solve this, thanks. Correct output as 
follows.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21285): https://lists.fd.io/g/vpp-dev/message/21285
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #socket-api get stuck in socket function

2022-04-25 Thread 2595676015a
Hi All ,

I'm trying to use nonblock socket with epoll.
I wonder why I sometimes get stuck in socket function when I use VCL .
Code as following:
printf ("before socket\n");
if ((c_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
perror("create socket fail.\n");
exit(0);
}
printf ("after socket\n");
The only output is "before socket",socket function even dosen't return.
Thank you very much

complete code is in attachments


 
#include 
#include 
#include 
#include 
#include  
 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
 
#include 
 
 
using namespace std;

int ep = -1;
 
void* epoll_loop(void* arg) {
ep = epoll_create(1024);
struct epoll_event eventArr[1000];
int status, err;
socklen_t len;
len = sizeof (err);
while (1){
int n = epoll_wait(ep, eventArr, 20, -1);
printf ("%d\n", n);
for (int i = 0; i < n; i++) {
epoll_event ev = eventArr[i];
int events = ev.events;
int c_fd = ev.data.fd;
printf ("fd:%d\n", c_fd);
if (events & EPOLLERR) {
printf ("EPOLLERR\n");
status = getsockopt(c_fd, SOL_SOCKET, SO_ERROR, &err, &len);
cout << status << "," << err << endl;
}
if (events & EPOLLIN) {
printf ("EPOLLIN\n");
status = getsockopt(c_fd, SOL_SOCKET, SO_ERROR, &err, &len);
cout << status << "," << err << endl;
}
if (events & EPOLLOUT) {
printf ("EPOLLOUT\n");
}
}
}
}
 
void* test_epoll (void* arg) {
string ip = "192.168.216.1";
int port = 5201;
int c_fd, flags, ret;
struct sockaddr_in s_addr;
memset(&s_addr, 0, sizeof (s_addr));
s_addr.sin_family = AF_INET;
s_addr.sin_port = htons(port);
s_addr.sin_addr.s_addr = inet_addr(ip.c_str());
 
 
printf ("before socket\n");
if ((c_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
perror("create socket fail.\n");
exit(0);
}
printf ("after socket\n");
flags = fcntl(c_fd, F_GETFL, 0);
if (flags < 0) {
perror("get socket flags fail.\n");
exit (-1);
}
 
if (fcntl(c_fd, F_SETFL, flags | O_NONBLOCK) < 0) {
perror("set socket O_NONBLOCK fail.\n");
exit (-1);
}
struct epoll_event event;
event.events = EPOLLIN | EPOLLOUT | EPOLLET;
event.data.fd = c_fd;
epoll_ctl(ep, EPOLL_CTL_ADD, c_fd, &event);

ret = connect(c_fd, (struct sockaddr*) &s_addr, sizeof (struct sockaddr));

if (ret < 0) {
if (errno == EINPROGRESS) {
return 0;
} else {
perror("connect remote server fail.\n");
printf("%d\n", errno);
exit(0);
}
}
return 0;
}


int main(int argc, char** argv) {
pthread_t tid1, tid2, tid3;
int rc1 = 0, rc2 = 0, rc3 = 0;
rc1 = pthread_create(&tid1, NULL, epoll_loop, NULL);
if(rc1 != 0)
printf("%s: %s\n",__func__, strerror(rc1));

sleep (1);
rc2 = pthread_create(&tid2, NULL, test_epoll, NULL);
if(rc2 != 0)
printf("%s: %s\n",__func__, strerror(rc2));
sleep (1);
rc3 = pthread_create(&tid3, NULL, test_epoll, NULL);
if(rc3 != 0)
printf("%s: %s\n",__func__, strerror(rc3));
while (1)
{
sleep(1);
}

return 0;
}

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21282): https://lists.fd.io/g/vpp-dev/message/21282
Mute This Topic: https://lists.fd.io/mt/90680910/21656
Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] plugin

2022-04-04 Thread 2595676015a
* 

I'm working on a plugin development,does anyone know how to share a global 
variable between two plugins?Thank you very much.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21190): https://lists.fd.io/g/vpp-dev/message/21190
Mute This Topic: https://lists.fd.io/mt/90236879/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #vpp-hoststack

2022-03-24 Thread 2595676015a
Dose anybody know if VCL supports raw_socket?Thanks.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21107): https://lists.fd.io/g/vpp-dev/message/21107
Mute This Topic: https://lists.fd.io/mt/89995693/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] #vpp-hoststack

2022-03-21 Thread 2595676015a
* 

Thank you for your answer, so is now only Cubic  supported?

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21089): https://lists.fd.io/g/vpp-dev/message/21089
Mute This Topic: https://lists.fd.io/mt/89934022/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] #vpp-hoststack

2022-03-21 Thread 2595676015a
Dose anyone konw that if vpp-hoststack supports tcp BBR congestion algorithm.I 
need to use it, thanks

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21085): https://lists.fd.io/g/vpp-dev/message/21085
Mute This Topic: https://lists.fd.io/mt/89934022/21656
Mute #vpp-hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-hoststack
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-