From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A0B9A046B for ; Wed, 24 Jul 2019 01:33:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 595ED1C0AD; Wed, 24 Jul 2019 01:33:29 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by dpdk.org (Postfix) with ESMTP id 527E21BFBE for ; Wed, 24 Jul 2019 01:33:28 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id r1so44869854wrl.7 for ; Tue, 23 Jul 2019 16:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nBfPoF6hmHOhpnC8q5GRHIx537Iv0ADBDa5jhb3F3tM=; b=cPD60tTdWqrQQ80ofdYaQb2nCZNTqqjTBy1JZ6+SQCesTXCX4OVHCbB/E+EqxU3OZt U4crpUrNx/Ys9J8Uxb3ChB1JVNxWRZpwaMddMM1DM7qYn6YlUoJys8/FqPy/LoUuAGHM HsK/tHszl+eHTZ8x/VR8i9J4KEboODp+wLUw6Hna8KNOlSF/RlLihpEt9NSgZkOM2Rpu xtpdTl+AjJczhTykYFEnduXb3q+RmFzSDcGRftJsbou/vJlMn3uKd8Y/N6VLe4G3xgec Kq49CAaDX640Qjw/bjNaZRNb5Y+81ozhbw7lIpcXTFX8GcZ3HMS+a+ZpCH+bf50yL1a9 ROsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=nBfPoF6hmHOhpnC8q5GRHIx537Iv0ADBDa5jhb3F3tM=; b=pDFGpu1tmxha8ek2Kr7zX5cHyxEotnHd0dKIpa8Haq7XUg6xOInIKEKHE0lY1QAn3l h13mcnwfQHQFPZyboHIaJHNgYUC2WYPyWb+293LEs7zDyd16FyJSLb5WcM9dwANzejYz xaG9yJhC3uuYNXZa+m5qCmCVaxJekXR2aLsR6KIOpWrUIWLUuifFNImQYG7neZY83Zi7 pzAeZKwr/noXUP57vfKQX4avCA6T+F7bKoCt1BWN6TGF76ofLWke/0GPjclA+cnCuaT+ SxKtL4awDbs9vKEUGpdF+4f23jUTX1r9pLnJ5w3vouEC+reMZf9YxKRGoWFDoi+NuVIc DD8w== X-Gm-Message-State: APjAAAWK6TVbE9sodz+1quslrre0aj57N3MlOL2I6vIkBW5IqiKYHj4F 4Te/4thudx3+20vlSsrwoyQYLokzWaTOSHdFZn4Pjvq2 X-Google-Smtp-Source: APXvYqyJF4oTx18Ly6G5GgaRebPYL2Rwp9/PtJowQTSxa5wXeJ7miZGlg6UpdLmXFzmwctdavFCLggjg3bRk5Osvcys= X-Received: by 2002:adf:d4c6:: with SMTP id w6mr85119907wrk.98.1563924807751; Tue, 23 Jul 2019 16:33:27 -0700 (PDT) MIME-Version: 1.0 From: Jun Gan Date: Tue, 23 Jul 2019 16:33:16 -0700 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Intel 10G X550T NIC takes a long time(25s+) after DPDK initialization to passing traffic correctly. X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi, We have an intel 10G X550T NIC, after bind it to igb_uio and launched our dpdk application. Although I don=E2=80=99t see any error reported while calling =E2=80=9Crte_= eth_tx_burst=E2=80=9D, I cannot see any packets on peer side, until at least 25 seconds later. Everything finally became normal. I don=E2=80=99t see this issue with my Mellanox ConnectX-5 NIC, using same = code. My dpdk init code, nothing special I think: Status InitDpdk() { Status status =3D SpdkHelper::Init(); if (status !=3D kStatusOk) { return GeneralError::EC_FAILURE; } rc =3D rte_openlog_stream(stderr); assert(rc =3D=3D 0); int dev_socket_id =3D rte_eth_dev_socket_id(eth_port_); rte_eth_dev_info_get(eth_port_, &dev_info_); if ((dev_info_.tx_offload_capa & DEV_TX_OFFLOAD_MULTI_SEGS) =3D=3D 0) { return GeneralError::EC_FAILURE; } int size_pktpool =3D 2048 //dev_info_.rx_desc_lim.nb_max + dev_info_.tx_desc_lim.nb_max + 512 /* PKTPOOL_EXTRA_SIZE */; // Packet mem pool for tx tx_pkt_pool_ =3D rte_pktmbuf_pool_create("pkt_pool_tx", size_pktpool, 32 /* per lcore cache size*/, 0, RTE_MBUF_DEFAULT_BUF_SIZE, dev_socket_id); assert(tx_pkt_pool_ !=3D NULL); // Packet mem pool for rx rx_pkt_pool_ =3D rte_pktmbuf_pool_create("pkt_pool_rx", size_pktpool, 32 /* per lcore cache size*/, 0, RTE_MBUF_DEFAULT_BUF_SIZE, dev_socket_id); assert(rx_pkt_pool_ !=3D NULL); struct rte_eth_conf cfg_port; memset(&cfg_port, 0, sizeof(cfg_port)); cfg_port.txmode.mq_mode =3D ETH_MQ_TX_NONE; cfg_port.txmode.offloads |=3D DEV_TX_OFFLOAD_MULTI_SEGS; // Reference for how to offload: // https://doc.dpdk.org/guides/prog_guide/mbuf_lib.html // Section "Meta Information". // Also rte_mbuf.h and examples. // Offload Tx checksums if possible std::string offloads; if (dev_info_.tx_offload_capa & DEV_TX_OFFLOAD_IPV4_CKSUM) { offloads +=3D " IPv4 Tx cksum"; cfg_port.txmode.offloads |=3D DEV_TX_OFFLOAD_IPV4_CKSUM; } if (dev_info_.tx_offload_capa & DEV_TX_OFFLOAD_UDP_CKSUM) { offloads +=3D " UDP Tx cksum"; cfg_port.txmode.offloads |=3D DEV_TX_OFFLOAD_UDP_CKSUM; } // Offload Rx checksums if possible if (dev_info_.rx_offload_capa & DEV_RX_OFFLOAD_IPV4_CKSUM) { offloads +=3D " IPv4 Rx cksum"; cfg_port.rxmode.offloads |=3D DEV_RX_OFFLOAD_IPV4_CKSUM; } if (dev_info_.rx_offload_capa & DEV_RX_OFFLOAD_UDP_CKSUM) { offloads +=3D " UDP Rx cksum"; cfg_port.rxmode.offloads |=3D DEV_RX_OFFLOAD_UDP_CKSUM; } rc =3D rte_eth_dev_configure(eth_port_, 1, 1, &cfg_port); assert(rc =3D=3D 0); if (rc) { return GeneralError::EC_FAILURE; } uint16_t n_rx_desc =3D 1024; uint16_t n_tx_desc =3D 1024; rc =3D rte_eth_dev_adjust_nb_rx_tx_desc(eth_port_, &n_rx_desc, &n_tx_desc= ); assert(rc =3D=3D 0); if (rc) { return GeneralError::EC_FAILURE; } struct rte_eth_rxconf rxconf; rxconf =3D dev_info_.default_rxconf; rc =3D rte_eth_rx_queue_setup(eth_port_, 0, n_rx_desc, dev_socket_id, &rxconf, rx_pkt_pool_); assert(rc =3D=3D 0); if (rc) { return GeneralError::EC_FAILURE; } struct rte_eth_txconf txconf; txconf =3D dev_info_.default_txconf; rc =3D rte_eth_tx_queue_setup(eth_port_, 0, n_tx_desc, dev_socket_id, &txconf); assert(rc =3D=3D 0); if (rc) { return GeneralError::EC_FAILURE; } rc =3D rte_eth_dev_start(eth_port_); assert(rc =3D=3D 0); if (rc) { return GeneralError::EC_FAILURE; } // RTE Ring for our TX packets, with multiple producers but single consumer tx_ring_ =3D rte_ring_create("TX Ring", tx_ring_size_, dev_socket_id, RING_F_SC_DEQ); assert(tx_ring_ !=3D nullptr); if (tx_ring_ =3D=3D nullptr) { return GeneralError::EC_FAILURE; } return kStatusOk; } Really appreciate it if someone can help! --=20 Jun Gan