On 10/04/2018 10:40 PM, Mauricio Vasquez wrote:
On 10/04/2018 06:57 PM, Alexei Starovoitov wrote:
On Thu, Oct 04, 2018 at 07:12:44PM +0200, Mauricio Vasquez B wrote:
Implement two new kind of maps that support the peek, push and pop
operations.
A use case for this is to keep track of a po
On Thu, Oct 04, 2018 at 10:40:55PM -0500, Mauricio Vasquez wrote:
>
> > > + /* Round up queue size to nearest power of 2 */
> > > + max_entries = index_mask + 1;
> > what's the point of roundup ?
>
> If the size of the buffer is power of two we can wrap the indexes with an
> AND operation instead
On Thu, Oct 04, 2018 at 07:12:44PM +0200, Mauricio Vasquez B wrote:
> Implement two new kind of maps that support the peek, push and pop
> operations.
>
> A use case for this is to keep track of a pool of elements, like
> network ports in a SNAT.
>
> Signed-off-by: Mauricio Vasquez B
> ---
> in
Implement two new kind of maps that support the peek, push and pop
operations.
A use case for this is to keep track of a pool of elements, like
network ports in a SNAT.
Signed-off-by: Mauricio Vasquez B
---
include/linux/bpf.h |7 +
include/linux/bpf_types.h |2
include/u