From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 39135A0544; Wed, 29 Jun 2022 16:55:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8802C42B6C; Wed, 29 Jun 2022 16:55:17 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 2CF9340042 for ; Wed, 29 Jun 2022 15:34:05 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id q18so14095403pld.13 for ; Wed, 29 Jun 2022 06:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=UxIk05yXbF686WB8UyEs2XlRlzO7aPandfYcorJMc94=; b=I8h38qEgYPQXDOm4+sM+aA4zfwx5duB+lNIytZAliHCV08SkzE1Tk6bYDWZ3SlcQDE NSP7bkfaii9+dJqUCDOT3NqDA+79t1RQwG3G8mVK3vDJXygnffEXzmLdxScpTsPw2t8b Mh77WYszIZtr2SnMZI+lSw4IvBmn4xDaeYxNZcMSbP/2mFvrUsaZ/cnDfJNYIGMtk+4o naM3S2x4gknBXv1UZX8/6qRTM2KIxasiFe82DUF4ueHwtl1BDkuns9bsthOEYIs1Ojp5 uwg0Bd9NX/AnvpCpyf1dQwR+BmRxFgpQOlaIrIWB8V3Y5ozQMMGekaPMyDOWQfyyWDxR PgGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UxIk05yXbF686WB8UyEs2XlRlzO7aPandfYcorJMc94=; b=BgkUN/pd6YWO0yKB0SHQeqJwybszlJp3BXSZ09KRkq1Eor5Dl5lfIXi69lTpsjm7rT hbuFUOg3GLXCSggd0nX4Su3u7W71muVVJA4ptFsgv6KCHnqyzYmAIBREljs5TBpCUWqq ZRMG8ZKSkm7m4zWUYpefQ4c1fbHhQy7R7c1Txg07TzOP5WxFt/K8ZjhL2GOS4SOhhSt0 ARXh9awMMcEfgIVJdzbzEliiBGEzLY/JKz7qV/5Slsm91q8hhh8yu+JD6TZRi5POguJP 1NdAk+vENGtSjKHhHJLtxO4poaOrRN/+4amtPO4hVOMQ7vU6WwGx7yocRKgRWOZ14LVV jS8Q== X-Gm-Message-State: AJIora8M3a24oVnPfn6YuVQ+FbWpjZ36zPHCHYw/G/RPkF6dlsFJQQu5 Y/QeTdqewDKYjFDgOZ4MMD2t7MdpMySY/0Z4wUB6BO6dftQ= X-Google-Smtp-Source: AGRyM1vx8oG/aLSH9BMZEO4pCN2raF9V2my9tUho5AXjlo8EBvN0wz87T21EXCAR6im8vgh8+O4w6/gPDMcCNhjathI= X-Received: by 2002:a17:902:d591:b0:16b:a170:8586 with SMTP id k17-20020a170902d59100b0016ba1708586mr2709822plh.91.1656509644236; Wed, 29 Jun 2022 06:34:04 -0700 (PDT) MIME-Version: 1.0 From: Acdam Bacdam Date: Wed, 29 Jun 2022 19:03:53 +0530 Message-ID: Subject: Running DPDK KNI sample App in K8 Pod To: dev@dpdk.org Content-Type: multipart/alternative; boundary="000000000000e96b6605e296343f" X-Mailman-Approved-At: Wed, 29 Jun 2022 16:55:11 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --000000000000e96b6605e296343f Content-Type: text/plain; charset="UTF-8" Hi Experts, I am trying to run a DPDK KNI based sample app inside the K8 Pod environment, but I am not able to do so without host-network permissions. I tried using KNI based sample application provided under DPDK 19.11 version, but it failed to create vEth0 inside the PoD environment *without host-network* permissions, though ifconfig shows vEth0 but it's not present under (/sys/devices/virtual/net/). As sample app uses dpdk kni api rte_kni_update_link, which internally uses this path(/sys/devices/virtual/net/vEth0/carrier) to bring vEth UP, but this path is not present hence failure in bringing UP the state of vEth. taskset 10 ./build/kni -c0x30 -n4 -- -P -p0x1 -m --config="(0,4,4)" [root@server ~]# ls /sys/devices/virtual/net/vEth0 ls: cannot access /sys/devices/virtual/net/vEth0: No such file or directory [root@server ~]# As soon as the pod is deployed *with host-network* permissions, whole network is available inside PoD with all required permissions and DPDK is able to create vEth (which creates /sys/devices/virtual/net/vEth0/carrier path) and sample app is able to update the link state of vEth and works perfectly fine. Any suggestions on what can be done to make it work inside a PoD environment without host-network permissions ? Best Regards, --000000000000e96b6605e296343f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Experts,

I am tryin= g to run a DPDK KNI based sample app inside the K8 Pod environment, but I a= m not able to do so without host-network permissions.

<= div>
I tried using KNI based sample application=C2=A0provided under DPD= K 19.11 version, but it failed to create vEth0 inside the PoD environment <= b>without host-network=C2=A0permissions, though ifconfig shows vEth0 bu= t it's not present under (/sys/devices/virtual/net/).=C2=A0
<= br>
As sample app uses dpdk kni api rte_kni_update_link, which in= ternally uses this path(/sys/devices/virtual/net/vEth0/carrier) to bring vE= th UP, but this path is not present hence failure in bringing UP the state = of vEth.

taskset 10 ./build/kni -c0x30 -n4 -- -P -= p0x1 -m --config=3D"(0,4,4)"

[r= oot@server ~]# ls /sys/devices/virtual/net/vEth0
ls: cannot acces= s /sys/devices/virtual/net/vEth0: No such file or directory
[root= @server ~]#

As soon as the pod is deployed= =C2=A0with host-network permissions, whole network is available insi= de PoD with all required permissions and DPDK is able to create vEth (which= creates /sys/devices/virtual/net/vEth0/carrier path)=C2=A0and sample app i= s able to update the link state of vEth and works perfectly fine.=C2=A0
=

Any suggestions on what=C2=A0can be done to make= =C2=A0it work inside a PoD environment without host-network=C2=A0permission= s ?

Best Regards,

= --000000000000e96b6605e296343f--