From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 7FBEAF11 for ; Wed, 29 Aug 2018 23:11:16 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id t25-v6so6859857wmi.3 for ; Wed, 29 Aug 2018 14:11:16 -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=AOW5o2CMDjsS+aLIOArp1rl4uxLZGXAcR+8c39mS5K8=; b=dw/TP0P6Z/ge93Y7zm38k1a/batIL+KmwwNBG6YgrXSfkg1tq9S1MRKEnP0G/WaDmC PEDQ3zZFHq1qtsoDMswtsQPrkupwOZtI1MQx8qFgK2VTIWizGjib38naQaJSzMVEMj40 YlNSbbWFpKHJnuqIoolYNLs9K3KOl5yzRghY1t8fvkTLWFDWA9ZcU+SS5p3P7lq7ysJi Vz2XgNSxHHD1oR7GWM2/saacqJjC2WQnbhoKqhvU0bRYTGidQGENlLA/qNENAnp9jC9W eWjBOc+z+89Pf3W8OTE2hFxX7YOws83SfEAANy0P/mgV3DrEhZypcjVypdUFsUfi3kPc CaJQ== 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=AOW5o2CMDjsS+aLIOArp1rl4uxLZGXAcR+8c39mS5K8=; b=WghxMBM1+NvcAtNyvf/zZnWJ96WENxlJs5SyVzdtJm8dVfBAjOVtG/y0RVx0cUw2XX Owg2BTeHAwDngc8W/Wap9ExSs38t/i11ef2kImQq8triRzLq6f3siiaSGq+EATTkpm6F E8eoek/O0nMU3p7vpsMaNhZ+1uBE80YnkXEHoE+XhfrsNK/mFn5JKH0NnQKHlXextN22 FtGicWvj2wjwoVeyllEqPTf3StlpC8ZyJlh0su12ol8pXTLdJlCKm1bnL68BEj0+VoGW CXW0b0wyPaocc53vWfhhIjjm1i9+CwfAnOmLnMMeHVXYpId6rspydDbbsgl+W9EwAgsp k0uA== X-Gm-Message-State: APzg51BlsZdZN0BOqCBgqjTst6w8pBRIyZnbGK1mTi3487hnsnxpetDT P0exIeV+glJGWGgqYActZOJrWro5kBchPSN9dW0= X-Google-Smtp-Source: ANB0VdYpLsmf0mrZVmnRrAoMaZtHxN3cm4liFbMdFDC4qUErrVOTzhg/dznXqfAQSySitUTovXvzl88FOFIGmQxGcC4= X-Received: by 2002:a1c:7301:: with SMTP id d1-v6mr5197393wmb.34.1535577075878; Wed, 29 Aug 2018 14:11:15 -0700 (PDT) MIME-Version: 1.0 Sender: dan.gora@gmail.com Received: by 2002:adf:fbc1:0:0:0:0:0 with HTTP; Wed, 29 Aug 2018 14:10:35 -0700 (PDT) In-Reply-To: <06764741-fa78-3bef-f790-a4e8d20a4209@intel.com> References: <20180628224513.18391-1-dg@adax.com> <20180629015508.26599-1-dg@adax.com> <20180629015508.26599-11-dg@adax.com> <06764741-fa78-3bef-f790-a4e8d20a4209@intel.com> From: Dan Gora Date: Wed, 29 Aug 2018 18:10:35 -0300 X-Google-Sender-Auth: uw2r3yD_BUiSrDK1_zFZqprYP0Q Message-ID: To: Ferruh Yigit Cc: 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: Wed, 29 Aug 2018 21:11:16 -0000 On Wed, Aug 29, 2018 at 8:48 AM, Ferruh Yigit wrote: > On 6/29/2018 2:55 AM, Dan Gora wrote: >> Add a new API function to KNI, rte_kni_update_link() to allow DPDK >> applications to update the link state for the KNI network interfaces >> in the linux kernel. >> >> Note that the default carrier state is set to off when the interface >> is opened. > > Why set carrier off when interface opened? A couple of reasons: 1) That's the way every other Ethernet driver in the linux kernel does it that I've seen. 2) The DPDK application may not actually be ready for the interface to be used when it is first created. Things like NetworkManager, etc will gladly go trying to assign IP addresses to those interfaces, add them to the routing table, etc as soon as the interface is marked "up". By making the default be "down", this allows the application to finish any initialization on the DPDK side of the interface before allowing it to be used by the kernel. > Although I don't see any difference > in interface state with or without this call. Previously in the 'ip addr' output, the 'state' would be 'UNKNOWN' when the interface was created. After this patch the 'state' in 'ip addr' is 'DOWN'. thanks dan