Re: [lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-03-03 Thread huanggaoyang
I don't think the PMR1~3 in your example will work like you said. If the incoming packet len is 0x1200: 0x1200 & 0x00FF(PMR1's mask)==0x, so the packet matchs PMR1... 0x1200 & 0x02FF(PMR3's mask)==0x0200, also matchs PMR3... But actually I want this 0x1200 packet match the Default Cos's PMR

Re: [lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-03-03 Thread Bala Manoharan
The concept of range for Packet matching terms was initially proposed in classification and was removed since most HW implement packet classifier using TCAM and TCAMs only support matching and mask. The range can be configured using the existing PMR by intelligently configuring the system by

Re: [lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-03-02 Thread huanggaoyang
Hi, Thank you for your explaining. But I can't totally agree with you. I don't know how does the ODP_PMR_LEN support range match. I mean if I want the packets with different lenth alloced from Pool No1~4 like this: lenthalloc from (0, 200)Pool-No.1 [200, 800)

Re: [lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-03-01 Thread Bala Manoharan
Hi, The above described use-case is implementable with the existing ODP classification framework. Few points to take note for implementing this use-case * Each CoS has an associated pool from which packets arriving at this CoS is allocated. * There is an existing PMR rule ODP_PMR_LEN which

[lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-02-29 Thread huanggaoyang
Signed-off-by: huanggaoyang --- include/odp/api/packet_io.h| 15 + .../linux-generic/include/odp_packet_io_internal.h | 1 + platform/linux-generic/include/odp_packet_tap.h| 5 +- platform/linux-generic/odp_packet_io.c | 16

[lng-odp] [API-NEXT PATCHv1] linux-generic:pktio:add an interface to support multi pool

2016-02-29 Thread huanggaoyang
Make the packet IO interface support multi packet pools with different buffer size. When receiving packets, the pktio will alloc packets from the most suitable pool via packet len. It aims to save the memory in case that the Memory Resource is limited, and the pktio should deal with packets