Re: [vpp-dev] ACL-->ABF--> Memif, Seeing arp request for the packets #acl #abf #policy #routing

2021-07-17 Thread RaviKiran Veldanda
Neale,
This is really I never thought we can create VLAN for memif This saved 
enormous of amount my time... I am really excited and its working perfectly 
fine.
//Ravi

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



Re: [vpp-dev] Buffer chains and pre-data area

2021-07-17 Thread jerome . bayaux
Hello Benoit, 

Thank you for your answer about buffer allocation in batches, my solution is 
way more efficient now. 

However, I still want to try to change the value of the " PRE_DATA_SIZE " cmake 
variable to see how it behaves with a greater value (i.e 256 instead of 128). 
To do so, I followed the method given in the documentation at the following url 
: [ 
https://fd.io/docs/vpp/master/gettingstarted/developers/buildsystem/cmakeandninja.html#tinkering-with-build-options-ccmake
 | 
https://fd.io/docs/vpp/master/gettingstarted/developers/buildsystem/cmakeandninja.html#tinkering-with-build-options-ccmake
 ] . 
The issue is that once I've changed the value of the " PRE_DATA_SIZE " 
variable, I press "c" to regenerate files that need to be regenerated and then 
I get this error in cmake output : 

CMake Error at cmake/misc.cmake:27 (_message): 
[1;31mDPDK RTE_PKTMBUF_HEADROOM (128) ;must be equal to PRE_DATA_SIZE 
(256)[m 
Call Stack (most recent call first): 
plugins/dpdk/CMakeLists.txt:65 (message) 

I guess I should also modify the value of " DPDK RTE_PKTMBUF_HEADROOM" but I 
don't know how I can do it ? Indeed, I can't find where this variable is 
defined. 

Jérôme 


De: "Benoit Ganne (bganne)"  
À: "jerome bayaux" , vpp-dev@lists.fd.io 
Cc: "Justin Iurman"  
Envoyé: Jeudi 15 Juillet 2021 19:16:32 
Objet: RE: Buffer chains and pre-data area 

Hi Jerome, 

> However, when I tried to perform some performance tests I was quite 
> disappointed by the results : the buffer allocation for each packet is not 
> efficient at all. My question is then : Is there any way to increase the 
> performances ? To allocate buffers, I use the function "vlib_buffer_alloc" 
> defined in "buffer_funcs.h" but is it the right function to use ? 

Do you allocate buffers in batch? Let's say you want to encapsulate a batch of 
packets, instead of doing: 

while (n_left) 
u32 bi 
vlib_buffer_t *b 
vlib_buffer_alloc(vm, &bi, 1) 
b = vlib_get_buffer (vm, bi) 
add b to the chain 
... 

You should do something like (allocation error checking etc. is left as an 
exercise): 

u32 bi[VLIB_FRAME_SIZE] 
vlib_buffer_t *bufs[VLIB_FRAME_SIZE] 
vlib_buffer_alloc (vm, bi, n_left) 
vlib_get_buffers (vm, bi, bufs, n_left) 

while (n_left) 
add bufs[i] to the chain 
... 

> In my case, the best option would be to have more space available in the 
> buffer's pre-data area but VPP does not seem to be built in a way that 
> allows easy modifications of the "PRE_DATA_SIZE" value. Am I right or is 
> there any "clean" method to change this value ? 

It is define as a cmake variable and can be customize through eg. cmake-gui. 

ben 


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19821): https://lists.fd.io/g/vpp-dev/message/19821
Mute This Topic: https://lists.fd.io/mt/84230132/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] ACL-->ABF--> Memif, Seeing arp request for the packets #acl #abf #policy #routing

2021-07-17 Thread Neale Ranns
Hi Ravi,

If you want the packet to egress with a VLAN, then you can create a VLAN 
sub-interface on the memif and point the policy via that.

/neale

From: vpp-dev@lists.fd.io  on behalf of RaviKiran Veldanda 
via lists.fd.io 
Date: Friday, 16 July 2021 at 19:06
To: vpp-dev@lists.fd.io 
Subject: Re: [vpp-dev] ACL-->ABF--> Memif, Seeing arp request for the packets 
#acl #abf #policy #routing

[Edited Message Follows]

Hi Neale,
Thanks for your time. Yes I got that and I did created a dummy arp to make this 
work.

ip neighbor memif1/0 192.168.1.3 dead.dead.dead

set acl-plugin acl permit dst 172.172.0.0/24

abf policy add id 0 acl 0 via 192.168.1.3 memif1/0

abf attach ip4 policy 0  HundredGigabitEthernet12/0/0.1100

however I have one more question, if we want to get VLAN header also on memif 
how can we get it?
I am seeing the packets with ehternet header but VLAN is getting stripped. How 
can we get VLAN header to memif when we do ABF

Any pointers will be a great help.
//Ravi

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