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 C9970A2EFC for ; Mon, 14 Oct 2019 21:02:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30DFC1C2E8; Mon, 14 Oct 2019 21:02:12 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 40C351C2DD for ; Mon, 14 Oct 2019 21:02:11 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id q10so40369105iop.2 for ; Mon, 14 Oct 2019 12:02:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1BWsGBK3CJMHw6zjU6/PPV1aZY7kzw+mvf26WjkrxlQ=; b=TqwPz42LIIJHltAkKChqA1QAQJI8zToJcoR1/6SvYm91V35dIAEoU9k3gL+0RZeGz+ 4ewEbFiGcCbfjpCjPahNq0rCVgNSA4ZqotNi1RAkhsC9iAxWfABS9/0oGC0hIrkURIUp gAFkMkNYAqPqZh6uk2rRoGNcrxr00I5WBrEiKbJi0DpobkNVt4xhVJr73/xWt7DO4kkT Q4qVnVXppEEGzhcVSKwIuG+T0D8bBwHHIRLEadihjZXqG7MCGreJ8CrPKRu2XE7UKKBf +HxN5voBN1YISGNwfPD6dUtFJdLxzQHkX0JB9lCidrt3tnbRNETz+QwD2VZvmIcu0VFi bsFg== X-Gm-Message-State: APjAAAXXyugpd6ylGauSQaMS9sWroyKD3PPIGCXmKaLkxhL/OtP/fOgd A61TLqUnwRSCUuAieISDWnC82Ma4aDYUL+nUgI8= X-Google-Smtp-Source: APXvYqzEKa7Ler/9MRsZWy7cyhSXA0iOpTxAaqW5/VJ4JDhlxNgukf8wO1Vxwws6G4ZZSMiPtD9UdbWUs7y2VKR/h/w= X-Received: by 2002:a92:1d5c:: with SMTP id d89mr1945739ild.94.1571079730256; Mon, 14 Oct 2019 12:02:10 -0700 (PDT) MIME-Version: 1.0 References: <20190924193312.17381-1-iryzhov@nfware.com> <20190925093623.18419-1-iryzhov@nfware.com> <05b55e82-f992-c9d3-593d-3c608b7bb543@intel.com> <347b8a5c-f7c8-45d4-063f-2a4b5bdf90cc@intel.com> In-Reply-To: <347b8a5c-f7c8-45d4-063f-2a4b5bdf90cc@intel.com> From: Dan Gora Date: Mon, 14 Oct 2019 16:01:34 -0300 Message-ID: To: Ferruh Yigit Cc: Igor Ryzhov , dev@dpdk.org, aconole@redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3] kni: rework rte_kni_update_link using ioctl 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" My original patch to add this feature was basically the same thing as this: setting the link status via a KNI ioctl. That method was rejected after _much_ discussion and we eventually settled on the currently implementation. My original patch was here: Message-Id: <20180628225548.21885-1-dg@adax.com> If you search for KNI and dg@adax.com in the DPDK devel list you should be able to suss out the whole discussion that lead to the current implementation. thanks dan On Mon, Oct 14, 2019 at 1:17 PM Ferruh Yigit wrote: > > On 10/14/2019 5:10 PM, Ferruh Yigit wrote: > > On 9/25/2019 10:36 AM, Igor Ryzhov wrote: > >> Current implementation doesn't allow us to update KNI carrier if the > >> interface is not yet UP in kernel. It means that we can't use it in the > >> same thread which is processing rte_kni_ops.config_network_if, which is > >> very convenient, because it allows us to have correct carrier status > >> of the interface right after we enabled it and we don't have to use any > >> additional thread to track link status. > > > > Hi Igor, > > > > The existing thread tracks the link status of the physical device and reflects > > the changes to the kni netdev, but the "struct rte_kni_ops" > > (rte_kni_ops.config_network_if) works other way around, it captures (some) > > requests to kni netdev and reflects them to the underlying physical device. > > Even 'rte_kni_update_link()' updated to use ioctl, the thread still looks > > required and this patch doesn't really changes that part. > > > > Also I am reluctant to extend the KNI ioctl interface when there is a generic > > way to do that work. > > > > What is the use case of updating kni netdev carrier status when the interface is > > down? > > btw, if the problem is status of the interface being 'no-carrier' by default, > this can be changed by "carrier=on" parameter of the kni kernel module: > "insmod ./build/kmod/rte_kni.ko carrier=on" > > > > >> > >> Signed-off-by: Igor Ryzhov > > > > <...> > > >