From patchwork Tue Sep 15 10:45:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameer Mahagneh X-Patchwork-Id: 1364213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrKnS2X3Pz9sTt for ; Tue, 15 Sep 2020 20:52:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8CF1F866AF; Tue, 15 Sep 2020 10:52:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hkwE-Uwi3Ceh; Tue, 15 Sep 2020 10:52:39 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 288288632F; Tue, 15 Sep 2020 10:52:39 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 15760C0864; Tue, 15 Sep 2020 10:52:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D6274C0051 for ; Tue, 15 Sep 2020 10:52:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B0B922052B for ; Tue, 15 Sep 2020 10:52:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ze4x1FJXT6MD for ; Tue, 15 Sep 2020 10:52:35 +0000 (UTC) X-Greylist: delayed 00:06:38 by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by silver.osuosl.org (Postfix) with ESMTP id 36A64204FF for ; Tue, 15 Sep 2020 10:52:34 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from ameerm@nvidia.com) with SMTP; 15 Sep 2020 13:45:54 +0300 Received: from mtl-vdi-111.wap.labs.mlnx. (mtl-vdi-111.wap.labs.mlnx [10.228.129.25]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 08FAjsD1019613; Tue, 15 Sep 2020 13:45:54 +0300 From: Ameer Mahagneh To: dev@openvswitch.org, Ilya Maximets Date: Tue, 15 Sep 2020 13:45:35 +0300 Message-Id: <20200915104535.143393-1-ameerm@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: Eli Britstein , moshele@nvidia.com, Ameer Mahagneh , adrianc@nvidia.com, Majd Dibbiny Subject: [ovs-dev] [PATCH 1/1] daemon-unix: Support OVS-DPDK HW offloads for non-root user X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" For security reasons only root or privileged user can allocate Interconnect Context Memory (ICM). Add this capability for vendors that require ICM allocation when applying DPDK rte flows. Signed-off-by: Ameer Mahagneh Acked-by: Eli Britstein --- lib/daemon-unix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/daemon-unix.c b/lib/daemon-unix.c index ae59ecf2c..d32a60657 100644 --- a/lib/daemon-unix.c +++ b/lib/daemon-unix.c @@ -820,6 +820,7 @@ daemon_become_new_user_linux(bool access_datapath OVS_UNUSED) if (access_datapath && !ret) { ret = capng_update(CAPNG_ADD, cap_sets, CAP_NET_ADMIN) || capng_update(CAPNG_ADD, cap_sets, CAP_NET_RAW) + || capng_update(CAPNG_ADD, cap_sets, CAP_SYS_RAWIO) || capng_update(CAPNG_ADD, cap_sets, CAP_NET_BROADCAST); } } else {