From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0C83A0547; Mon, 30 Aug 2021 20:05:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6D17C40141; Mon, 30 Aug 2021 20:05:59 +0200 (CEST) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mails.dpdk.org (Postfix) with ESMTP id 0988040041 for ; Mon, 30 Aug 2021 20:05:57 +0200 (CEST) Received: by mail-ed1-f46.google.com with SMTP id dm15so22915840edb.10 for ; Mon, 30 Aug 2021 11:05:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P0vKzUUZ02cYbRPHlZCbUnD4Q20FZUS1sLz09W5T6j0=; b=LeCj5YKL2Y/kB/GhInVTQ519v9AfufouRNJ6pinjBikVhRiCKsgWl77zHkn1cEzz2y 3KO8tDuLMtEOU8Zi2fKNgXBUokH0N+2/9wnGjLlZANXd3lRU2GGfURz7Vxp61m+NhVBW C5itVAJagCw4+mEvLDA6yHFY880kQvXUcWuERIyKzPCaRLJkmdl8oQbK5FwhL8/Ot2/4 ARF+bN3s7xQbqyGAUKYIUzN7WYKj12N+5XcZXogiDZox7p2f75VDXNfZ1A1chrRb9j81 xeQFJcgg+wleDirhLJqR+vuuuVKYGrileFrPa1vqm9lIKcKV6L3YIVZzKaq2a5uucGwc kfIg== 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=P0vKzUUZ02cYbRPHlZCbUnD4Q20FZUS1sLz09W5T6j0=; b=WrEYyknVPA00PFNgqnpiw0tZjgePGuUj8KxrynUQ7UkTfWtY1ltxwqNGIF8aJkZIAX 3TnjlpHfAsk1VkTuTAPD67PCWOlvLubtkW2HGsAsLz/NnV050WBC9tezd2XWbugVP+VD H6Ul7LCVdWoP8eGvsu3qPaAnj/7PW9bCBDTSIIsLfvPBRokEmlPOS+OSNqHCgQvgGV9n 0buz9VjX42qs5gKoIm+F+1y8zRGVfTmnjih7c2Qd+9znsRvu/ZfFCZ0w1vKGRQT4/3hF /7GBtrNFfPI59aIouMjoExndloBiwtJpOt5sn8QUpydrWT8suijoy/1TDsgpFh+hS0Tm Cq5A== X-Gm-Message-State: AOAM532GOSNTOGfJ+SK3F0VCMDek+K7U8WWi8rToCAI2G/oztNmO9BV0 s7XePUZB6Sq1U4M2VTrDRYDp+7nkd+GyE6q6bQdDYA== X-Google-Smtp-Source: ABdhPJwmWl5JCMWzBuoEs4kICxp0VTgml14VRT1uV4l5cFjI+KiM0qs+Bu7l//aonx19Cm2A2UtpT3fUTMqcZJCrVAo= X-Received: by 2002:a50:ee94:: with SMTP id f20mr25363993edr.117.1630346757685; Mon, 30 Aug 2021 11:05:57 -0700 (PDT) MIME-Version: 1.0 References: <20210704160610.62682-1-iryzhov@nfware.com> <20210826151911.15699-1-iryzhov@nfware.com> <20210826101535.7b9c08c1@hermes.local> <20210826110615.00b84400@hermes.local> In-Reply-To: <20210826110615.00b84400@hermes.local> From: Igor Ryzhov Date: Mon, 30 Aug 2021 21:05:46 +0300 Message-ID: To: Stephen Hemminger Cc: dev , Ferruh Yigit , Dan Gora Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v5 1/3] kni: rework rte_kni_update_link using ioctl X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Thu, Aug 26, 2021 at 9:06 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Thu, 26 Aug 2021 20:46:47 +0300 > Igor Ryzhov wrote: > > > Could you please clarify where exactly do I need to use rtnl lock? > > From what I understand, netif_carrier_on/off can be called without the > lock. > > Just a basic concern. The new stuff looks ok. > If you follow what current upstream virtio is doing, it should be safe. > > See drivers/net/virtio/virtio_net.c, looks like more is needed? Thanks for the suggestion, I looked at it. > Do you call ethtool_validate_speed() and ethtool_validate_duplex()? > The problem with those functions is that they are only available since kernel version 4.6 and currently we have to also support 4.4. I don't think we need to introduce more compatibility code, as nothing really bad happens if the developer provides some invalued values. The worst thing is that ethtool will show weird speed or unknown duplex. > > Also, in virtio the driver does stop/wakeup of tx queues on carrier change. > This can be added for sure, but this improvement is not actually related to my patch. We don't currently stop kernel's tx queue when the link is down and I don't change that behavior. The code change is trivial but I'll need to find some time to test that everything works fine, so let's consider it a separate thing, please.