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 125DD42979 for ; Tue, 18 Apr 2023 09:51:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80D9E40EDF; Tue, 18 Apr 2023 09:51:10 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id A3E5E40698 for ; Tue, 18 Apr 2023 09:51:08 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-63b5c4c769aso1879558b3a.3 for ; Tue, 18 Apr 2023 00:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681804268; x=1684396268; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Yl83lpv6+WAGaxdUtAJTFERX0WJBWw1Z1J9ROuvIARk=; b=dlcFPCNlA/9fOLvPifTOAKB5zhNMuORLuWfSQvWPTQ4PgQBBHCuhN9EIj+U+lZ3DKt OUBUngom0ciT2cXH7FrzemCGxkFkFiqQd+DkMgTra2zMNzbXAAJoTZqNmGuPJ70sv6QK VUYnY91YsnWAlfoiD1tl98o3N5CJSSO2oHPlsZQxq5aFx3Au5wmowfhde6am2v9boLrd +3eTQBG43d0TQiYOw0LnDac2gGJyCErx44TnmZ5Ru4QBo46QFAKYWGNrfMspav5IxKHG cqN0py7M7q7GpCwSi9qesVXH2l1/Z6/GBJAcNVXJJ5eznIdm7kIDZKguIu//zKO0uj3d GZ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681804268; x=1684396268; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Yl83lpv6+WAGaxdUtAJTFERX0WJBWw1Z1J9ROuvIARk=; b=VHl8VQxKcgQk88oODzSIGsmVD0f2bILHCBylQlWi95LenXsvanIbqmEQuvIfGnneQu RIPqBGDX9lrGyiwFbOg7NgmQf6BLRUZjYWDEZUMHFvRcQldRy9Ijs/qDIqj9wavDHwVB R2zt01dfabGxv+B9+NE7yR1VL7hYoIL/Y8DME0hrnO8H92nQqyUvOc6Xeup49l26iCu3 nbUGnVtGQUCIbavOz7nJIimkcTCb+nJzvgjg0ajj0kdx4ewSjktk3kqlNPtRmmV8Km4o TC+1ww2qeVnuF3DD81Bu2tFCPR71tnuhJpnYa78ngqr/wKxXikoGww8u66JNj2PMKpkp Tf3Q== X-Gm-Message-State: AAQBX9eFIHejUvapieICPcAE4iLjp6+6qkvctt+KkFX3KuG3q/c6eW25 9Z/OoW2pcnIrJGUpy8XQY/F2PssfocnzxDndviA= X-Google-Smtp-Source: AKy350Z/cHAEqtfR5s4uEvYGdT3NCjm06XIBbmepxNlP1OFM1tQMHKo6Xr+EOlgEr+iAakqZipV56sKlaKYtbbn9lbQ= X-Received: by 2002:a05:6a00:2281:b0:63d:2cff:bfbc with SMTP id f1-20020a056a00228100b0063d2cffbfbcmr2143505pfe.3.1681804267742; Tue, 18 Apr 2023 00:51:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "J.J. Martzki" Date: Tue, 18 Apr 2023 15:50:54 +0800 Message-ID: Subject: Re: Use case understanding for l3fwd To: Dinesh Kumar Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org >From your picture, l3fwd is running in VM2, with a tap vdev. But what's the relationship between VM1 and VM2? Are they running on the same host? I assume: 1. VM1 and VM2 are running on the same host. 2. ens05 is a net device in VM1. 3. VM1 has its own net device, let's call it ens06, and IP2 is on it. Based on the assumptions above, you should make sure VM1 and VM2 can communicate with each other without l3fwd, just through the linux network stack. This ensures the link between these 2 VMs is good (ens05 in VM2 and ens06 in VM1 can reach each other directly). Maybe they are connected by a linux bridge on the host or something like that. And you l3fwd should attach to ens05, by vfio or uio. Just use dpdk-devbind.py to do this. After this, ens05 is no longer available in the kernel, and l3fwd can use it. As your command line '-p 0x3' described, l3fwd will use port 0 and port 1. You can use l3fwd init log to make sure there are 2 ports available for l3fwd as we expected. BTW, I suggest you start from test-pmd first. test-pmd can connect ports ethier. But it supports interactive mode and many command lines. Such as display of port info like MAC you mentioned before. > Please share some link that has details descriptions about testing this f= low : I didn't find a suitable article to describe this, maybe you can try: https://www.redhat.com/en/blog/how-vhost-user-came-being-virtio-networking-= and-dpdk In this article, the DPDK application is ovs, just like your l3fwd. And it can attach many ports not only vhost ports but also physical ports, vdev ports like tap and so on. J.J. Martzki, Best wishes. Dinesh Kumar =E4=BA=8E2023=E5=B9=B44=E6=9C=8817=E6= =97=A5=E5=91=A8=E4=B8=80 23:47=E5=86=99=E9=81=93=EF=BC=9A > > Hi JJ, > Thank you for the clarification. I am new to this so trying to understand= how it will work. > > Please share some link that has details descriptions about testing this f= low : > > | VM1 | HOST > | VM2 | > app <- device -> qemu <- pmd -> l3fwd <- pmd -> qemu <- device -> app > > Sorry for my misunderstanding. > > here is the correct flow I am working on now : > After running the below command from VM2, I am pinging IP address of VM1= vi network namespace ns0, but not able to see any message in l3fwd and pin= g is unreachable. > Thanks for your time and any help will be really appreciated. > > > > On Fri, Apr 14, 2023 at 10:46=E2=80=AFPM J.J. Martzki wrote: >> >> > Is this process correct to assign IP and then device to DPDK? >> No, after binding the driver to vfio/uio, the IP configuration is no >> longer available. >> The IP is something belonging to an application, not a driver (DPDK). >> >> > Is there any way to see ip and ethernet address after binding to DPDK? >> MAC is available for the rte_eth_dev, there's some API like >> rte_eth_macaddr_get() to get MAC >> from a specific port. l3fwd should have some CLI commands for getting >> MAC ethier, maybe >> you can read it's documents. >> IP is not available as I said before. >> >> BTW, your topo is confusing. Are you running 2 l3fwd in 2 separate >> VMs? It's not gonna work. >> AFAK, l3fwd switches packets from ports which attached to it. You >> can't use 2 separate l3fwd >> to connect 2 VMs. >> >> If you are tring to connect 2 VMs, the classic topo is something like: >> | VM1 | HOST >> | VM2 | >> app <- device -> qemu <- pmd -> l3fwd <- pmd -> qemu <- device -> app >> >> J.J. Martzki, >> Best wishes. >> >> Dinesh Kumar =E4=BA=8E2023=E5=B9=B44=E6=9C=8814= =E6=97=A5=E5=91=A8=E4=BA=94 01:32=E5=86=99=E9=81=93=EF=BC=9A >> > >> > Hello Experts, >> > >> > I am trying to run the following scenario using l3fwd example in dpdk-= stable-21.11.2 release . >> > >> > The flow is : >> > >> > VM1 = VM2 >> > ns0->tap0->DPDK <---------------------> DPDK-> bind a = device with IP >> > >> > >> > The first question I have for VM2: >> > I assigned IP to the device and can see eth and static ip address via = 'ip add ', then after binding it to dpdk, I can not see this information v= ia ip add because it is not controlled by kernel module. >> > Is there any way to see ip and ethernet address after binding to DPDK? >> > Is this process correct to assign IP and then device to DPDK? >> > >> > >> > on VM1: >> > After starting the DPDK application, I can see a tap0 device created = in kernel mode via 'ip add show'.Then I attached this interface with networ= k namespace via: >> > >> > ip netns add ns0 >> > ip link set tap0 netns ns0 >> > ip netns exec ns0 ip addr add dev tap0 >> > ip netns exec ns0 ip link set tap0 up >> > ip netns exec ns0 ip link set lo up >> > >> > Still, I am not able to ping anything from this ns0. >> > >> > Do I need any other configuration to ping via ns0 to VM2? >> > >> > Sorry, in case I am asking any dumb questions, I am new to DPDK and tr= ying to make the use case work. >> > Any help/pointer is really appreciated. >> > >> >