[vpp-dev] VPP 2106 Linux-cp plugin supports ipv6 handling ?

2021-08-30 Thread chetan bhasin
Hi,

We are on vpp2106 , We are using linux-cp plugin. Does it support Ipv6
traffic as well ?
 I can see Ipv4 traffic is going to tap interface created using below
command but Ipv6 traffic is still handled by VPP plugin nodes
lcp create | host-if  netns 
[tun]

Thank,
Chetan

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



Re: [vpp-dev] Blocking API call #ACL #binapi

2021-08-30 Thread Ole Troan
Ravi,

> We want to use API calls to create the ACL and ABF policies. We need a 
> blocking calls because we need to decide next action on the return values.
> When I checked using the VAPI, I see only Asynchronous calls and we need to 
> register callback for return values but I need a blocking calls
> For example If I want use Show version with blocking call and return values 
> how can I achieve.
> Is there a way to use Blocking API calls and get return values.
> If any example to use Blocking API calls that will be great.. thanks.

https://docs.fd.io/vpp/21.06/d4/d09/vapi_doc.html

https://git.fd.io/vpp/tree/src/vpp-api/vapi/vapi_c_test.c#n424

Best regards,
Ole



signature.asc
Description: Message signed with OpenPGP

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20045): https://lists.fd.io/g/vpp-dev/message/20045
Mute This Topic: https://lists.fd.io/mt/85224886/21656
Mute #binapi:https://lists.fd.io/g/vpp-dev/mutehashtag/binapi
Mute #acl:https://lists.fd.io/g/vpp-dev/mutehashtag/acl
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 2106 Linux-cp plugin supports ipv6 handling ?

2021-08-30 Thread Pim van Pelt
Hoi,

Yes, VPP's 21.06 plugin supports IPv4, IPv6, ARP and Neighbor Discovery to
the host through the TAP.

groet,
Pim

On Mon, Aug 30, 2021 at 9:06 AM chetan bhasin 
wrote:

> Hi,
>
> We are on vpp2106 , We are using linux-cp plugin. Does it support Ipv6
> traffic as well ?
>  I can see Ipv4 traffic is going to tap interface created using below
> command but Ipv6 traffic is still handled by VPP plugin nodes
> lcp create | host-if  netns
>  [tun]
>
> Thank,
> Chetan
>
> 
>
>

-- 
Pim van Pelt 
PBVP1-RIPE - http://www.ipng.nl/

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



Re: [vpp-dev] FD.io Maintenance: 2021-08-31 15:00 UTC to 1900 UTC

2021-08-30 Thread Vanessa Valderrama
Maintenance reminder

Jenkins will be placed in shutdown mode at 14:00 UTC

On 8/27/21 12:55 PM, Vanessa Valderrama wrote:
>
> *What:*
>
> In preparation for Jenkins and Ingress to migrate to the new data
> center The Linux Foundation will be migrating the instances from V2 to
> V3 flavors.
>
> *When:*
>
> 2021-08-31 15:00 UTC to 1900 UTC
>
>
> *Impact:*
>
> Due to the Ingress migration, all systems will be unavailable during
> the maintenance window.
>

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



[vpp-dev] VAPI ACL addition. Not getting ACL index in response. #acl #acl_plugin #vapi

2021-08-30 Thread RaviKiran Veldanda
Hi Experts,
We are trying to use VPP-API(VAPI) to create ACL rules.
We are using the VAPI in blocking mode to get response immediately.
We are getting the response back but the *ACL-INDEX is some other value*. Can 
you please see the below code, if I am doing something wrong.
Any pointers are big help.

printf ("--- Basic acl addition- reply test ---\n");
vapi_msg_acl_add_replace *acl= vapi_alloc_acl_add_replace(ctx, 1);
if(acl==NULL)
{
printf("ACL retuns NULL %d\n",__LINE__);
exit(1);
}
acl->payload.acl_index=-1;
strncpy((char *)acl->payload.tag,"CheckIsWorking",12);
acl->payload.count=1;
vapi_type_prefix src_addr,dst_addr;
acl->payload.r[0].is_permit=1;
src_addr.address.af=0;
src_addr.len=24;//prefix len
inet_aton("172.1.1.0",(struct in_addr *)&(src_addr.address.un.ip4));
dst_addr.address.af=0;
dst_addr.len=24;//prefix len
inet_aton("111.1.1.0",(struct in_addr *)&(dst_addr.address.un.ip4));
acl->payload.r[0].src_prefix=src_addr;
acl->payload.r[0].dst_prefix=dst_addr;
vapi_msg_acl_add_replace_hton(acl);
rv = vapi_send (ctx, acl);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);

}
vapi_payload_acl_add_replace_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);
}
printf("So the reply receivied ACL Index %d Retval 
%d\n",resp->acl_index,resp->retval);
vapi_msg_free (ctx, resp);

//Ravi.

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



[vpp-dev] VAPI ACL addition. Not getting ACL index in response. #acl #acl_plugin #vapi

2021-08-30 Thread RaviKiran Veldanda
[Edited Message Follows]

Hi Experts,
We are trying to use VPP-API(VAPI) to create ACL rules.
We are using the VAPI in blocking mode to get response immediately.
We are getting the response back but the *ACL-INDEX is some other value*. Can 
you please see the below code, if I am doing something wrong.
Any pointers are big help.

printf ("--- Basic acl addition- reply test ---\n");
vapi_msg_acl_add_replace *acl= vapi_alloc_acl_add_replace(ctx, 1);
if(acl==NULL)
{
printf("ACL retuns NULL %d\n",__LINE__);
exit(1);
}
acl->payload.acl_index=-1;
strncpy((char *)acl->payload.tag,"CheckIsWorking",12);
acl->payload.count=1;
vapi_type_prefix src_addr,dst_addr;
acl->payload.r[0].is_permit=1;
src_addr.address.af=0;
src_addr.len=24;//prefix len
inet_aton("172.1.1.0",(struct in_addr *)&(src_addr.address.un.ip4));
dst_addr.address.af=0;
dst_addr.len=24;//prefix len
inet_aton("111.1.1.0",(struct in_addr *)&(dst_addr.address.un.ip4));
acl->payload.r[0].src_prefix=src_addr;
acl->payload.r[0].dst_prefix=dst_addr;
vapi_msg_acl_add_replace_hton(acl);
rv = vapi_send (ctx, acl);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);

}
vapi_payload_acl_add_replace_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);
}
printf("So the reply receivied ACL Index %d Retval 
%d\n",resp->acl_index,resp->retval);
vapi_msg_free (ctx, resp);
*This is our testing Output:*
# ./vapi_cli
--- Basic show version message - reply test ---
show_version_reply: program: `vpe', version: `21.06.0-2~g99c146915-dirty', 
build directory: `/opt/vpp', build date: `2021-07-29T16:36:55'
--- Basic acl addition- reply test ---
So the reply receivied ACL Index 42754 Retval 0

*VPP created the ACL:
*
# vppctl show acl-plugin acl
acl-index 0 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.0.1.0/24 dst 111.0.1.0/24 proto 0 sport 0 dport 0
acl-index 1 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 2 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 3 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 4 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 5 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0

I am expecting the vapi_payload_acl_add_replace_reply *resp; should contain the 
acl_index but not. Can someone help.

//Ravi.

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



[vpp-dev] VAPI ACL addition. Not getting ACL index in response. #acl #acl_plugin #vapi

2021-08-30 Thread RaviKiran Veldanda
[Edited Message Follows]

Hi Experts,
We are trying to use VPP-API(VAPI) to create ACL rules.
We are using the VAPI in blocking mode to get response immediately.
We are getting the response back but the *ACL-INDEX is some other value*. Can 
you please see the below code, if I am doing something wrong.
Any pointers are big help.

printf ("--- Basic acl addition- reply test ---\n");
vapi_msg_acl_add_replace *acl= vapi_alloc_acl_add_replace(ctx, 1);
if(acl==NULL)
{
printf("ACL retuns NULL %d\n",__LINE__);
exit(1);
}
acl->payload.acl_index=-1;
strncpy((char *)acl->payload.tag,"CheckIsWorking",12);
acl->payload.count=1;
vapi_type_prefix src_addr,dst_addr;
acl->payload.r[0].is_permit=1;
src_addr.address.af=0;
src_addr.len=24;//prefix len
inet_aton("172.1.1.0",(struct in_addr *)&(src_addr.address.un.ip4));
dst_addr.address.af=0;
dst_addr.len=24;//prefix len
inet_aton("111.1.1.0",(struct in_addr *)&(dst_addr.address.un.ip4));
acl->payload.r[0].src_prefix=src_addr;
acl->payload.r[0].dst_prefix=dst_addr;
vapi_msg_acl_add_replace_hton(acl);
rv = vapi_send (ctx, acl);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);

}
vapi_payload_acl_add_replace_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);
}
printf("So the reply receivied ACL Index %d Retval 
%d\n",resp->acl_index,resp->retval);
vapi_msg_free (ctx, resp);
*This is our testing Output:*
# ./vapi_cli
--- Basic show version message - reply test ---
show_version_reply: program: `vpe', version: `21.06.0-2~g99c146915-dirty', 
build directory: `/opt/vpp', build date: `2021-07-29T16:36:55'
--- Basic acl addition- reply test ---
So the reply receivied *ACL Index 42754 Retval 0*

*VPP created the ACL:
*
# vppctl show acl-plugin acl
acl-index 0 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.0.1.0/24 dst 111.0.1.0/24 proto 0 sport 0 dport 0
acl-index 1 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 2 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 3 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 4 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0
acl-index 5 count 1 tag {CheckIsWorki}
0: ipv4 permit src 172.1.1.0/24 dst 111.1.1.0/24 proto 0 sport 0 dport 0

I am expecting the *vapi_payload_acl_add_replace_reply *resp; should contain 
the acl_index but not. Any help is truly appreciated.*

//Ravi.

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



Re: [vpp-dev] VAPI ACL addition. Not getting ACL index in response. #acl #acl_plugin #vapi

2021-08-30 Thread RaviKiran Veldanda
Sorry for spamming, anyway, I found the problem.
I was sending wrong response structure causing the problem.
We supposed to use,
*vapi_msg_acl_add_replace_reply* *resp;
*vapi_payload_acl_add_replace_reply* *resp;
Its working fine.
Just incase some one wants to use above example, providing working one below.
printf ("--- Basic acl addition- reply test ---\n");
vapi_msg_acl_add_replace *acl= vapi_alloc_acl_add_replace(ctx, 1);
if(acl==NULL)
{
printf("ACL retuns NULL %d\n",__LINE__);
exit(1);
}
acl->payload.acl_index=-1;
strncpy((char *)acl->payload.tag,"CheckIsWorking",12);
acl->payload.count=1;
vapi_type_prefix src_addr,dst_addr;
acl->payload.r[0].is_permit=1;
src_addr.address.af=0;
src_addr.len=24;//prefix len
inet_aton("172.1.1.0",(struct in_addr *)&(src_addr.address.un.ip4));
dst_addr.address.af=0;
dst_addr.len=24;//prefix len
inet_aton("111.1.1.0",(struct in_addr *)&(dst_addr.address.un.ip4));
acl->payload.r[0].src_prefix=src_addr;
acl->payload.r[0].dst_prefix=dst_addr;
vapi_msg_acl_add_replace_hton(acl);
rv = vapi_send (ctx, acl);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);

}
vapi_msg_acl_add_replace_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);
}
vapi_msg_acl_add_replace_reply_ntoh(resp);
printf("So the reply receivied ACL Index %d Retval 
%d\n",resp->payload.acl_index,resp->payload.retval);

vapi_msg_free (ctx, resp);

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



Re: [vpp-dev] VAPI ACL addition. Not getting ACL index in response. #acl #acl_plugin #vapi

2021-08-30 Thread RaviKiran Veldanda
[Edited Message Follows]

Sorry for spamming, anyway, I found the problem.
I was sending wrong response structure causing the problem.
We supposed to use,
*vapi_msg_acl_add_replace_reply* *resp; but I was using 
*vapi_payload_acl_add_replace_reply* *resp;
Its working fine.
Just incase some one wants to use above example, providing working one below.
printf ("--- Basic acl addition- reply test ---\n");
vapi_msg_acl_add_replace *acl= vapi_alloc_acl_add_replace(ctx, 1);
if(acl==NULL)
{
printf("ACL retuns NULL %d\n",__LINE__);
exit(1);
}
acl->payload.acl_index=-1;
strncpy((char *)acl->payload.tag,"CheckIsWorking",12);
acl->payload.count=1;
vapi_type_prefix src_addr,dst_addr;
acl->payload.r[0].is_permit=1;
src_addr.address.af=0;
src_addr.len=24;//prefix len
inet_aton("172.1.1.0",(struct in_addr *)&(src_addr.address.un.ip4));
dst_addr.address.af=0;
dst_addr.len=24;//prefix len
inet_aton("111.1.1.0",(struct in_addr *)&(dst_addr.address.un.ip4));
acl->payload.r[0].src_prefix=src_addr;
acl->payload.r[0].dst_prefix=dst_addr;
vapi_msg_acl_add_replace_hton(acl);
rv = vapi_send (ctx, acl);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);

}
vapi_msg_acl_add_replace_reply *resp;
size_t size;
rv = vapi_recv (ctx, (void *) &resp, &size, 0, 0);
if(rv!=VAPI_OK)
{
printf("vapi_Send %d\n",__LINE__);
exit(1);
}
vapi_msg_acl_add_replace_reply_ntoh(resp);
printf("So the reply receivied ACL Index %d Retval 
%d\n",resp->payload.acl_index,resp->payload.retval);

vapi_msg_free (ctx, resp);

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20049): https://lists.fd.io/g/vpp-dev/message/20049
Mute This Topic: https://lists.fd.io/mt/85263360/21656
Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi
Mute #acl_plugin:https://lists.fd.io/g/vpp-dev/mutehashtag/acl_plugin
Mute #acl:https://lists.fd.io/g/vpp-dev/mutehashtag/acl
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 2101 , we have to reduce the frame size to 128 for our use case

2021-08-30 Thread chetan bhasin
Hi,

As 6windstack uses a vector size of 32  ,so for comparison we are doing
some performance testing with VPP using different vector sizes.

Thanks,
Chetan

On Fri, Aug 27, 2021 at 4:53 PM  wrote:

> Changing VLIB_FRAME_SIZE “should just work” but you could consider
> adjusting whichever input node(s) you’re using to limit the inbound frame
> size.
>
>
>
> Just to ask: why do you want to reduce the frame-size?
>
>
>
> D.
>
>
>
> *From:* vpp-dev@lists.fd.io  *On Behalf Of *chetan
> bhasin
> *Sent:* Friday, August 27, 2021 1:38 AM
> *To:* vpp-dev 
> *Subject:* [vpp-dev] vpp 2101 , we have to reduce the frame size to 128
> for our use case
>
>
>
> Hi,
>
>
>
> We have a use case where we have to reduce the frame-size to 128,
> changing VLIB_FRAME_SIZE to 128 will do the trick ? or do we need to change
> anything else other than this ? Please advise.
>
>
>
> Thanks,
>
> Chetan
>

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