From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 389D44C74 for ; Wed, 12 Sep 2018 00:08:29 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id w11-v6so27610605wrc.5 for ; Tue, 11 Sep 2018 15:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4/b18cFK8kymF2pk88DoFW5SgZvUS46ZB9jj5qJqhB8=; b=BBsid2Al8Aj59+P0dPZVN+YvkEgui3Nk1p6stX068q1ZchrDwzNKqMH2myAldkE/ny 2+EfAuhF1bJdyLpfNgvbYh9+5DQA1we/5Lpdz7V2bPYWLnW9PKXE+qBy+bhHPJ3pJx/y FE/C67Zn6z88hNZ882Qo9xZGOmnIOOqu6xQ480+OGdUzmknpF3t9gRS2zdMBR6Lq8uYF 9FNXiMa8qeMXsqH35yhyC8UTggR/W+r0wTpUfgyf8Czswvl4NzxcHGNtEUzOG1CXUMZk F517dqM/5OCWQXudN4xf2e/TmJ529mqyzuzifhZTtDc2GLtVeJNMLUMZGBI+M3O3fSwb 2LLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4/b18cFK8kymF2pk88DoFW5SgZvUS46ZB9jj5qJqhB8=; b=qlsbShTsrvZOMaeoKLnKjU6TagxlKdp53pY6PR7pOjAze6LHAC1wL5b9J8QrrTPOtq cU03VQZGGcLOiL9t+i1xoR0Y60VvCFD86qVZpVJ+Jrk+nHqVZlmtFotwlm4THQmhTXD2 L7s5hubmWu8ylyMX2zuaBhMbcsxpe5MVc4Sd+VfCzdndC0kMoisl0vNNzHdD8/nW0llg Dq5Gm7Nz2sU4v4cPleS4I6zpig1noYleipGBYoa2bUuapR5Ot+jOjjUSbCwc5jbaGzbE kd8N85TOg4Q4wO1u7UZSXEH+lwHdCIEnztK+hnRROuUljOlzcc6ok18NU4TnHIPUyk2a VN5g== X-Gm-Message-State: APzg51DoEGf4Zd+0mR9JVXqZIrnec6XW+K1uzohy+Z1961mqUFFsyTO4 mtquqD3CnC1r2AKWFiKtYKeX/zGgvz9pk6eDH3p2m69c X-Google-Smtp-Source: ANB0Vda6lN86daPgpAkxiBoAjFt9bdgxKH/R3c+0pp1/tYQAog5P+KDXkxHiyMsspuGD7tZXbjf4OaP9/ScMLzR9Lzo= X-Received: by 2002:adf:ce90:: with SMTP id r16-v6mr19435908wrn.112.1536703708550; Tue, 11 Sep 2018 15:08:28 -0700 (PDT) MIME-Version: 1.0 Sender: dan.gora@gmail.com Received: by 2002:adf:fbc1:0:0:0:0:0 with HTTP; Tue, 11 Sep 2018 15:07:47 -0700 (PDT) In-Reply-To: <20180911145248.7512abd1@xeon-e3> References: <20180628224513.18391-1-dg@adax.com> <20180629015508.26599-1-dg@adax.com> <20180629015508.26599-11-dg@adax.com> <20180829085410.4411c07e@xeon-e3> <20180829150014.0ae59128@xeon-e3> <20180829161043.11bb2434@xeon-e3> <20180830150911.6b0e7901@xeon-e3> <20180905135751.74f6c14b@shemminger-XPS-13-9360> <20180911145248.7512abd1@xeon-e3> From: Dan Gora Date: Tue, 11 Sep 2018 19:07:47 -0300 X-Google-Sender-Auth: 8iGm4egHDna2wqL95FgViazMUmA Message-ID: To: Stephen Hemminger Cc: Igor Ryzhov , Ferruh Yigit , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 10/10] kni: add API to set link status on kernel interface 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: Tue, 11 Sep 2018 22:08:29 -0000 On Tue, Sep 11, 2018 at 6:52 PM, Stephen Hemminger wrote: > The carrier state has no meaning when device is down, at least for physical > devices. Because often the PHY is powered off when the device is marked down. The thing that caught my attention is that when you mark a kernel ethernet device 'down', you get a message that the link is down in the syslog. snappy:root:bash 2645 => ip link set down dev eth0 Sep 11 18:32:48 snappy kernel: e1000e: eth0 NIC Link is Down With this method, that's not possible because you cannot change the link state from the callback from kni_net_release. The carrier state doesn't have any meaning from a data transfer point of view, but it's often useful for being able to diagnose connectivity issues (is my cable plugged in or not). I'm still not really clear what the objection really is to the ioctl method. Is it just the number of changes? That the kernel driver has to change as well? Just that there is another way to do it? thanks dan