From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by dpdk.org (Postfix) with ESMTP id 4AABE5B20 for ; Wed, 21 Nov 2018 10:01:56 +0100 (CET) Received: by mail-oi1-f169.google.com with SMTP id x23so3927219oix.3 for ; Wed, 21 Nov 2018 01:01:56 -0800 (PST) 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=mzxvcKpc+SqDw/L+Y9WVCDTPOW1S2TQTj+URHQKjN6I=; b=VrnZ01KHSYg/ItX2RC+5JmBvSscLB+OJkSkdL9v9O72KHihMvYSc7be9R0RNF7tcr7 pNtg0q60X347YmEe7R6bhptRiFpNJ0GV594YqUIomTXeBohghHopB+6RU+ZZQJmH8mjU CAeiUyscb2+oPaojWimwsHPnDPprglYhc/7HA1K/g7QJ1mcFyCq7PopXctgRqZ4fV73W /3RYaokr12tQgPuuj+eLiNI4R1w6Y/1aSi9D/cIqwyX2kkouwW5VvtEJUKO2DXLmJpEg S4kS5Gb9z/810JrsQig6Er3wOPesBjVtZVCDctIZnl7vFBgFPX33lUTfHfylzo4SFgq6 6tvA== 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=mzxvcKpc+SqDw/L+Y9WVCDTPOW1S2TQTj+URHQKjN6I=; b=kyweY4jlKLqF0HAoQwKlZdMsM9WY4gF5b7R9KY1LEtOpsVpn3PT7FPQDJk8Nggt/6F JfmrlFHsJO7F8vKi7rxUrnkIGo+MXRzVWpPzFHMisaET6Qm8h7iXh+CDUViHFHfM8/83 /NtKc0+8BFtrjJYTkMg/fC06LY/IRjqz0icxSSz0syrVRPxpxTZCcThX+Ms6Sp3MKZqs 8GtOUbtT2YN9F1BAJqJlHweRnwsNHhVzECBeGRNjCkfdBzEN/U5+KaKvzKb4WzmcdDeV xIaZaAHV17wLZDgeH1Lckppq3KEblWyzEtj4RvRs8SAx+IwB5XIzcEz1Qd/wSlRvRwEl IeYw== X-Gm-Message-State: AGRZ1gJnyFaLoE9k3yBtVwHP1UuG0D5QSc34aZCMNiutuLJ5S+0fqCkw lnGnKcnm5w9BVQzWt1WoYUrOLqqgkuBmT3/WVVe9ibqB850= X-Google-Smtp-Source: AJdET5cnWRTQ3cfMYXBl3Bjsx9UCeSi2BTVJ/OElWCRExDhAjNFp9rGYE3iV6zd9ruGTcHEplLrjc6udESbcD8PltKU= X-Received: by 2002:aca:4f16:: with SMTP id d22mr2964564oib.255.1542790915071; Wed, 21 Nov 2018 01:01:55 -0800 (PST) MIME-Version: 1.0 From: Amedeo Sapio Date: Wed, 21 Nov 2018 12:01:28 +0300 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] MLX5 driver - number of descriptors overflow X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 09:01:56 -0000 Hello, I experienced a problem with the MLX5 driver running a code that is working fine with an Intel card. I have found that the reason of this error is an overflow of the uint16_t number of descriptors in the mlx driver. Here the details: - The NIC is a Mellanox ConnectX-5 100G. - This is a summary code that I run to initialize the port: ret = rte_eth_dev_configure(dpdk_par.portid, 1, 1, &port_conf); dpdk_par.port_rx_ring_size = dev_info.rx_desc_lim.nb_max; dpdk_par.port_tx_ring_size = dev_info.tx_desc_lim.nb_max; ret = rte_eth_dev_adjust_nb_rx_tx_desc(dpdk_par.portid, &dpdk_par.port_rx_ring_size, &dpdk_par.port_tx_ring_size); ret = rte_eth_rx_queue_setup(dpdk_par.portid, 0, dpdk_par.port_rx_ring_size, rte_eth_dev_socket_id(dpdk_par.portid), &rx_conf, dpdk_data.pool); ret = rte_eth_tx_queue_setup(dpdk_par.portid, 0, dpdk_par.port_tx_ring_size, rte_eth_dev_socket_id(dpdk_par.portid), &tx_conf); ret = rte_eth_dev_start(dpdk_par.portid); - The "rte_eth_dev_start" function returns -ENOMEM = -12 (Out of memory) - I see that "dev_info.rx_desc_lim.nb_max" is 65535. This value is rounded to the next power of 2 in "mlx5_rx_queue_setup", which overflows and becomes 0. I thought that "rte_eth_dev_adjust_nb_rx_tx_desc" should have adjusted the value, but clearly it has not. Thanks, --- Amedeo