From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id EB8203BA8E for ; Mon, 6 Aug 2018 21:57:41 -0400 (EDT) Received: by mail-qt0-x242.google.com with SMTP id b15-v6so16169994qtp.11 for ; Mon, 06 Aug 2018 18:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=39DsDZZQStqd2i5od1eil6czYgvOL3n44LCmcXAHC8Q=; b=MRvW7pOY0Bm98hUj3TLL2OAEOmUb7Xli87mw8wAdz7iMOz919gcDWOnnBQ/6EFSGT7 E/Va0H1qNzcYlYGeDnMH37ZINbJ6t9Fbnr21v3HOR5UBE1Ey+y/wKZbTcK0D+R6aVCBc 1D21PAqKUCD8IyytNE97YfqdJoI//5w2F2qrpqe0PeLSZKsPelNhXm+MOBP2jHh9LlTV fabDna8duPuhtt5A89GzKXrhV46u4BB1pz2Rq/inwZcsRaiSjI/tG5NEqaRnoI5af6MC I1XbVCIKlhlwx7vGEYGEH5QnAwjMxoBd0Fnd59QXQyhJDJvKqclmbWk/7IWtjeIFHEg/ YJrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=39DsDZZQStqd2i5od1eil6czYgvOL3n44LCmcXAHC8Q=; b=nE7qKfDQWIfA1jd7QuDS4jm2IGeVte+2dZBL6JILmrrVGcp+HMFyy/WWRZqPGmoKpb dlIgMFKrOACSWIten1qYiVArq+MXMAeQlTTWU08Xjf5W0rtuP5aSWUqe05V6N1Kul5sq Y3oaOky7VtKtXvu7nosaX3NLRHMPFcUx/NBgdj00Zl1RALcK/7oZqZWmK1BmiDhbJVWh hAx2BFKy/msaRaSkA4jIilOEbpe+QU7ep0rI5vnq82eXofcFCRvoIaGhm3so0M2/XiQc 9CyRQEZwUDQ20A+zITlYKvS2ykk9WLPO9wVzj1k1fa6puJcE1Sb8Z6rhMAmzj0uqJSih H98w== X-Gm-Message-State: AOUpUlFVEUsdqeyXHUjyPrqlDvBddf4gb0mkolBMmled1GMMsBI9Ihdy xOPtKVv8YgU01MP6jo/QaPjd6QbO1aNK+yeBfmN0WQ== X-Google-Smtp-Source: AAOMgpdCKE518GoI16xodMSoW0ZdfqZ3iPlkuSxFscsDlM3gL0UUCWV2FKQT4YoTVDhcqE/ZkZVz2V8gFjwkVSYukFQ= X-Received: by 2002:a0c:93b3:: with SMTP id f48-v6mr15117706qvf.151.1533607061144; Mon, 06 Aug 2018 18:57:41 -0700 (PDT) MIME-Version: 1.0 References: <153356387977.6981.12236150594041620482.stgit@kernel> In-Reply-To: <153356387977.6981.12236150594041620482.stgit@kernel> From: Dave Taht Date: Mon, 6 Aug 2018 18:58:07 -0700 Message-ID: To: cerowrt-devel@lists.bufferbloat.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [Cerowrt-devel] Fwd: [PATCH bpf-next 0/3] Implement bpf map queue X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2018 01:57:42 -0000 I think I have a new aphorism. The size of any hardware oriented language grows until it can support an infinite fifo queue. ---------- Forwarded message --------- From: Mauricio Vasquez B Date: Mon, Aug 6, 2018 at 8:09 AM Subject: [PATCH bpf-next 0/3] Implement bpf map queue To: Alexei Starovoitov , Daniel Borkmann Cc: Bpf queue map is a new kind of map that provides a LIFO/FIFO queue implementation. In some applications, like a SNAT, it is necessary to keep track of a pool of free elemenets, network ports in this case, then a queue can be used for that purpose. Signed-off-by: Mauricio Vasquez B --- Mauricio Vasquez B (3): bpf: add bpf queue map selftests/bpf: add test cases for BPF_MAP_TYPE_QUEUE bpf: add sample for BPF_MAP_TYPE_QUEUE include/linux/bpf_types.h | 1 include/uapi/linux/bpf.h | 5 + kernel/bpf/Makefile | 2 kernel/bpf/queuemap.c | 287 +++++++++++++++++++++++++++= ++++ kernel/bpf/syscall.c | 61 +++++-- kernel/bpf/verifier.c | 16 +- samples/bpf/.gitignore | 1 samples/bpf/Makefile | 3 samples/bpf/test_map_in_map_user.c | 9 - samples/bpf/test_queuemap.sh | 37 ++++ samples/bpf/test_queuemap_kern.c | 51 ++++++ samples/bpf/test_queuemap_user.c | 53 ++++++ tools/include/uapi/linux/bpf.h | 5 + tools/testing/selftests/bpf/test_maps.c | 72 ++++++++ 14 files changed, 577 insertions(+), 26 deletions(-) create mode 100644 kernel/bpf/queuemap.c create mode 100755 samples/bpf/test_queuemap.sh create mode 100644 samples/bpf/test_queuemap_kern.c create mode 100644 samples/bpf/test_queuemap_user.c -- --=20 Dave T=C3=A4ht CEO, TekLibre, LLC http://www.teklibre.com Tel: 1-669-226-2619