From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) by dpdk.org (Postfix) with ESMTP id 541A09A92 for ; Wed, 22 Jun 2016 14:19:54 +0200 (CEST) Received: by mail-io0-f175.google.com with SMTP id s63so38233944ioi.3 for ; Wed, 22 Jun 2016 05:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=XJAyFvN0LUexvUonUqm7aaujMCBR1Ua0uu2kVChJV6k=; b=Yv2clBqvSXBvrJ4eMusbn3g/J28+T8gPKoeBJnunJDvdjt7ky93VEdvEBcayY1yQRh 5D38XexWXMR3rkpM3zK/OaFf+/Z3SvXqQ7Y5Mh4545XV2oxU1C1mVS+k1rz5MgpeWH+B Q93nTHNQvsPWfTf6SBT7py82uydyzG45j1EeVxBp1Epq24nqV9wwndmYgwbHUjXGUULS h9aQs9wVhAymgzc7HMMtFiFJYVaYpFue63+5sS9waz0ZJasnStTnvzUsGuAE1tjGfmoN n10X3/Lg60mVQAxiGmdZjzO98jj46oppDIBWWivxP72Z+7niypvv5emi0a1WThRB9KrO /0JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XJAyFvN0LUexvUonUqm7aaujMCBR1Ua0uu2kVChJV6k=; b=lsuYkftAdTsjfWW4sRlyl48XCtUldH5CmN3jueQSv2AIYxxeyCxEHirl2JM8KxsMFN 9/ZK3i5z6ONKLG9JRjVCg6pEG2TtnTwK1EMaOGm/C31Xdorp/6QQnHj+6JCRQUm+xlYE rB6JhF/cO4VzURltCUTIzjZmwYhbW47u4vT1QmUGMT1HpBfWAjwvZnwJ7XwKNvUUg1qE p20ppFJhfKqbCgYfrO+Bp39Tf/1fPhi2+BzSSRXvBqy2isLN0JpTOVZBjEh//Nai+5Zq zYHCD4PR8bIssNsTkznM5+x8w05Bd+VrDpkPckgev/MgXk6Pw23WIW3PagLL+M0RPdk3 KfkA== X-Gm-Message-State: ALyK8tJrUbQiGLFbn1lXWofpQB5WELST/reDEwD9l0gyQ6l/ndysz/hU1+W2rwDl33ML07SXho8h2X2NtkrsDQ== X-Received: by 10.107.159.16 with SMTP id i16mr29400003ioe.29.1466597993617; Wed, 22 Jun 2016 05:19:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.64.86 with HTTP; Wed, 22 Jun 2016 05:19:53 -0700 (PDT) From: Gadre Nayan Date: Wed, 22 Jun 2016 17:49:53 +0530 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 Subject: [dpdk-users] Get interface speed through IOCTL X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2016 12:19:54 -0000 Hi, I need to get the interface speed though standard IOCTL call: edata.cmd = ETHTOOL_GSET; // issue ioctl rc = ioctl(sock, SIOCETHTOOL, &ifr); However, for 10G interface I do not read a correct speed, since it may not be supported. Out 1G cards are I350 and 10G card is I40. After going through the source, I cam across the function igb_get_settings() { ecmd->supported = (SUPPORTED_10baseT_Half| ...| .... ); switch(adapter->link_speed) { case SPEED_1000: case SPEED_2500: //etc etc. } } There is no support for 10000base. So to get the ioctl working for 10G card, is it a trivial change of adding few more support options and adding another case SPEED_10000 clause, or is it more involved ? Thanks