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 59842A00C2 for ; Fri, 14 Oct 2022 06:52:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CDE74014F; Fri, 14 Oct 2022 06:52:40 +0200 (CEST) Received: from mail-ua1-f47.google.com (mail-ua1-f47.google.com [209.85.222.47]) by mails.dpdk.org (Postfix) with ESMTP id B207C400D4 for ; Fri, 14 Oct 2022 06:52:38 +0200 (CEST) Received: by mail-ua1-f47.google.com with SMTP id y20so1528627uao.8 for ; Thu, 13 Oct 2022 21:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=summitscientificinc-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=oitKvuCLBKTCgujJzuKEc51czWXDjAbb3X2rLaobmM0=; b=o/MB7djCiK6ZM1YQZddlN7TqqXsn1DXtetpxSMs8HPsO2FGqRW94ooreojmDxUYzp4 +TFSyIEBC9etiKEb+BBM9f7Uzi0uTHrBUiCWMQrJBzD5cqhD95Ykqlpcjf35byixSeXS oI71dwALcl6/0tuiKN4hLbe3p1LlGxYjWITfVjk0CcCkkC4gv6iCBdO1bI1ilh0yLZXy gsdKYlg7Ig/g8orczCWCDJDzvwYH1Lpar/lr3f/uqZO7f5ou3OsN6CQsEeZqIfZ3cjIq yLVOSsKhSTNZ9S1Z15nV929B8sKbAV9fKmAVGl0xYYAUm4ceAUtMeMl64aNHWnVc2/kP VpXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oitKvuCLBKTCgujJzuKEc51czWXDjAbb3X2rLaobmM0=; b=8FcQ0SU8lSkzDUzI4UHHdfOa1m2cw9SVjWZfNxp3EFQlBARCQHSnXBp4xVuIbFnTPk 5zFuqFy0jZ2pnm/92XUBuAc7k5MkIVEpWUn4q+t3QsinH9VPod6YBEkqwwJ+Cz5l31yV tUXowiHnCMHuDtNtaUJowYW8PW+hKEf5DpGT8EvS7yQxt6On7/gmH4wRuV9kFKaZxWPw +GHlcR+bH438YUtH7TKK6MW4dDkk0lILB7LjDRuYSKy10IdlMP5b/zKffEkd3NN9D18a S88BobBozlp2jVCMHlCtSjw1HL0TxkPtBKasVegkOLIXUDLNULdVtniHGn3PGR7B0YVc Vg4w== X-Gm-Message-State: ACrzQf0fQSh2G2/tToO4FZloenf01BRuRKP1SeABmHvkk/7h4oAQ+6aU E4UPC0qP9Ch+ZZEhUCZU5H0gSBSelsEwBV1zeRu7Sx3DmvWWYA== X-Google-Smtp-Source: AMsMyM5L+TDv9+g/YCWJh7Xd/ObyF4yrdETW2HyTWvz7eB7m03ZmGdwLf/xAaC+JqjFxP0NVNIPG0g8+eFThRdW7YdY= X-Received: by 2002:ab0:7315:0:b0:3d0:e9c6:115c with SMTP id v21-20020ab07315000000b003d0e9c6115cmr1532643uao.1.1665723157852; Thu, 13 Oct 2022 21:52:37 -0700 (PDT) MIME-Version: 1.0 From: Robert Van Rooyen Date: Thu, 13 Oct 2022 21:52:26 -0700 Message-ID: Subject: Unable to Restart a Session To: users@dpdk.org Content-Type: multipart/alternative; boundary="0000000000001e477705eaf76578" 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 --0000000000001e477705eaf76578 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have an application where a call netOpen() and netClose() multiple times within the same process (see below) to create, use, and destroy a session. The first session works fine, however after the second netOpen() call I never receive any packets from the destination device on the network. I tried various sequences with the API that seemed reasonable, but I cannot get the second netOpen() to receive any packets. It may also be the case that the transmit never happens and as a consequence nothing is received from the destination device on the network. Note that netInit() is called once at the start of the application process and netShutdown() is called when the application terminates. Are there any obvious issues with the sequences listed that would prevent a subsequent session from working in terms of transmit and receive? netInit() // Called once at start of application rte_log_set_global_level(=E2=80=A6) // Set global log level rte_eal_init(=E2=80=A6) // Initialize EAL rte_eth_dev_count_avail // Determine the number of ports rte_pktmbuf_pool_create(=E2=80=A6) // Create memory pool rte_lcore_count() // Validate cores For each port rte_eth_dev_reset(=E2=80=A6) // Reset port rte_eth_dev_set_link_up(=E2=80=A6) // Bring up link on port Wait for link to come up or timeout rte_eth_link_get_nowait(=E2=80=A6) For each port rte_eth_dev_socket_id(=E2=80=A6) // Validate polling threads netOpen() // Called by the application when creating a session rte_eth_dev_get_port_by_name(=E2=80=A6) // Get the name of the port rte_eth_dev_stop(=E2=80=A6) // Stop the port rte_eth_dev_info_get(=E2=80=A6) // Get device info rte_eth_dev_configure(=E2=80=A6) // Configure device rte_eth_dev_adjust_nb_rx_tx_desc(=E2=80=A6) // Adjust descriptors For each rx queue rte_eth_rx_queue_setup(=E2=80=A6) // Setup receive queues For each tx queue rte_eth_tx_queue_setup(=E2=80=A6) // Setup transmit queues rte_eth_promiscuous_enable(=E2=80=A6) // Enable promiscuous mode rte_eth_macaddr_get(=E2=80=A6) // Store MAC address rte_ring_create(=E2=80=A6) // Create receive ring rte_eth_dev_start(=E2=80=A6) // Start the port netClose() // Called by the application when destroying a session rte_eth_dev_stop(=E2=80=A6) // Stop the port rte_ring_free(=E2=80=A6) // Free the receive ring netShutdown() // Called once at termination of application rte_eal_cleanup() // Release all resources --0000000000001e477705eaf76578 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have an application where a call netOpen() and netClose(= ) multiple times within the same process (see below) to create,=C2=A0use, a= nd destroy a session. The first session works fine, however after the secon= d netOpen() call I never receive any packets from the destination device on= the network. I tried various sequences with the API that=C2=A0seemed reaso= nable, but I cannot get the second netOpen() to receive any packets. It may= also be the case that the transmit never happens and as a consequence noth= ing is received from the destination device on the network. Note that netIn= it() is called once at the start of the application process and netShutdown= () is called when the application terminates. Are there any obvious issues = with the sequences listed that would prevent a subsequent=C2=A0session from= working in terms of transmit and receive?

netInit() // = Called once at start of application
rte_log_set_global_level(=E2=80=A6) = // Set global log level
rte_eal_init(=E2=80=A6) =C2=A0// Initiali= ze EAL
rte_eth_dev_count_avail // Determine the number of ports
rte_pktmbuf_pool_create(=E2=80=A6) =C2=A0// Create memory pool
rte_lcore_count() =C2=A0// Validate cores
For each port
r= te_eth_dev_reset(=E2=80=A6) =C2=A0// Reset port
rte_eth_dev_set= _link_up(=E2=80=A6) =C2=A0// Bring up link on port
Wait for l= ink to come up or timeout
rte_eth_link_get_nowait(=E2=80=A6)
For each port
rte_eth_dev_socket_id(=E2=80=A6)= =C2=A0// Validate polling threads
netO= pen() // Called by the application when creating a session
rte_eth_dev_g= et_port_by_name(=E2=80=A6) // Get the name of the port
rte_eth_de= v_stop(=E2=80=A6) =C2=A0// Stop the port
rte_eth_dev_info_get(=E2= =80=A6) =C2=A0// Get device info
rte_eth_dev_configure(=E2=80=A6)= =C2=A0// Configure device
rte_eth_dev_adjust_nb_rx_tx_desc(=E2= =80=A6) =C2=A0// Adjust descriptors
For each rx queue
rte_eth_rx= _queue_setup(=E2=80=A6) =C2=A0// Setup receive queues
<= div>For each tx queue
rte_eth_tx_queue_setup(=E2=80=A6) =C2=A0// Setup tra= nsmit queues
rte_eth_promiscuous_enable(=E2=80=A6) =C2=A0// Ena= ble promiscuous mode
rte_eth_macaddr_get(=E2=80=A6) =C2=A0// St= ore MAC address
rte_ring_create(=E2=80=A6) =C2=A0// Create rece= ive ring
rte_eth_dev_start(=E2=80=A6) =C2=A0 // Start the port<= /div>
netClose() =C2=A0// Called by the appli= cation when destroying a session
rte_eth_dev_stop(=E2=80=A6) =C2=A0// St= op the port
rte_ring_free(=E2=80=A6) =C2=A0// Free the receive ri= ng
netShutdown() // Called once at termination of ap= plication
rte_eal_cleanup() =C2=A0// Release all resources
--0000000000001e477705eaf76578--