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 7A80EA04FD for ; Sun, 20 Mar 2022 16:36:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08642410EE; Sun, 20 Mar 2022 16:36:01 +0100 (CET) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mails.dpdk.org (Postfix) with ESMTP id 64074410D4 for ; Sun, 20 Mar 2022 16:35:59 +0100 (CET) Received: by mail-lj1-f178.google.com with SMTP id bn33so17034940ljb.6 for ; Sun, 20 Mar 2022 08:35:59 -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=bjAwcnPpRNI8xeDkBJ1vD9V9ykCmD9SEwOSY0CIuMlE=; b=pGw+7qZ7l8BYibjR/6AX1tJiUHaa2p+jfHzenY/KARjkJ2e44dlaRKuHkrbz+Z5DYv /BS0g6SRjV7R3XssoTpybZeoQ28ot1WzjOpiioMXSC+xKqj70J74s2COrZbneJxIysME mgqr42gQd+RSzKQ31QI/Ir3uTrAg87RB+2rJU2AZeLoNwVofyLibEipN2y7GtjHjROoH 9tPBt9UvYZWuqjcl2bSco0TGYUcl5N75rTvconYeKHnhTpJojJ4WYb6FxmG8tWJ7zqAo u9WLSRQrvb+RbJmgbwnNck2mRLnfqQ50sl6fM/DZyeXaVqc8p9mg/g5PMoq0feKDsO2U gCWA== 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=bjAwcnPpRNI8xeDkBJ1vD9V9ykCmD9SEwOSY0CIuMlE=; b=Og75IIXN5Xmg7XMJo67YbRGRhpsg6/n7j6LSslBW5qxUzERoPxBcPtAcOpAtPqIqpj RTwnzXzX9olWPv+GUU5XxI8EL2njnkI3Odjbbf4xjIYJ+jm1UJK9Tl+2hd4lpi8Mm1No IPqXBWg3ACjN6DosA078y9kz3QB5WiFhttYgWXRin1ckrbTCLTWa5YPDYOE8Wg0JuVT0 AVzHinyyFKRU8L9DIkYaPxMMq351nemKf51//h82+8kFRVt+8YiM75/0DtmplPkhP/B6 yuwldiAFOuvDECyRcQeGcdA9Wp9nlSzQbWgmcTNKJF9kmjiLN36qsPbCAUQuQK2uloqr TOSw== X-Gm-Message-State: AOAM531Xx48E57eaG3EbHQWVgownWCXXMFrEXda7E9WIRDDxZwYRynfJ 6KiDACNqSlxSExt23o3t1yWjLlnNnWLiPhLzqow0MELbGePWkQ== X-Google-Smtp-Source: ABdhPJzJWLvAoMIlF8cknym85CJySuJ+TPCthLeHn0dBxPUPA/iJ/MjYpymdlkws2yPsvERDx/7a5jN0g0kdTXONqfg= X-Received: by 2002:a2e:1618:0:b0:247:eb53:6d5b with SMTP id w24-20020a2e1618000000b00247eb536d5bmr12691336ljd.312.1647790558534; Sun, 20 Mar 2022 08:35:58 -0700 (PDT) MIME-Version: 1.0 From: Antonio Di Bacco Date: Sun, 20 Mar 2022 16:35:47 +0100 Message-ID: Subject: MEMIF usage with dpdk-replay To: users@dpdk.org Content-Type: multipart/alternative; boundary="000000000000e7dfe605daa82258" 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 --000000000000e7dfe605daa82258 Content-Type: text/plain; charset="UTF-8" I'm using a dpdk-replay application (that reads from pcap and sends to a port) and I'm passing the parameter --vdev net_memif in order that the application sends packets to the memif PMD interface. Before launching dpdk-replay I launch the testpmd like this: dpdk-testpmd -l 4-5 --proc-type=primary --file-prefix=pmd1 --vdev=net_memif The dpdk-replay is using the following code to start the port but unfortunately the link status is always down and rte_eth_tx_burst doesn't send anything. /* Configure for each port (ethernet device), the number of rx queues & tx queues */ if (rte_eth_dev_configure(port, 0, /* nb rx queue */ NB_TX_QUEUES, /* nb tx queue */ ðconf) < 0) { fprintf(stderr, "DPDK: RTE ETH Ethernet device configuration failed\n"); return (-1); } /* Then allocate and set up the transmit queues for this Ethernet device */ for (i = 0; i < NB_TX_QUEUES; i++) { ret = rte_eth_tx_queue_setup(port, i, TX_QUEUE_SIZE, cpus->numacore, &txconf); if (ret < 0) { fprintf(stderr, "DPDK: RTE ETH Ethernet device tx queue %i setup failed: %s", i, strerror(-ret)); return (ret); } } /* Start the ethernet device */ if (rte_eth_dev_start(port) < 0) { fprintf(stderr, "DPDK: RTE ETH Ethernet device start failed\n"); return (-1); } /* Get link status and display it. */ rte_eth_link_get(port, ð_link); if (eth_link.link_status) { printf(" Link up - speed %u Mbps - %s\n", eth_link.link_speed, (eth_link.link_duplex == ETH_LINK_FULL_DUPLEX) ? "full-duplex" : "half-duplex\n"); } else { printf("Link down\n"); } --000000000000e7dfe605daa82258 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+SSYjMzk7bSB1c2luZyBhIGRwZGstcmVwbGF5IGFwcGxpY2F0aW9uICh0 aGF0IHJlYWRzIGZyb20gcGNhcCBhbmQgc2VuZHMgdG8gYSBwb3J0KSBhbmQgSSYjMzk7bSBwYXNz aW5nIHRoZSBwYXJhbWV0ZXIgLS12ZGV2IG5ldF9tZW1pZiBpbiBvcmRlciB0aGF0IHRoZSBhcHBs aWNhdGlvbiBzZW5kcyBwYWNrZXRzIHRvIHRoZSBtZW1pZiBQTUQgaW50ZXJmYWNlLiBCZWZvcmUg bGF1bmNoaW5nIGRwZGstcmVwbGF5IEkgbGF1bmNoIHRoZSB0ZXN0cG1kIGxpa2UgdGhpczo8YnI+ PGJyPmRwZGstdGVzdHBtZCAtbCA0LTUgLS1wcm9jLXR5cGU9cHJpbWFyeSAtLWZpbGUtcHJlZml4 PXBtZDEgLS12ZGV2P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