From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F614C282E0 for ; Fri, 19 Apr 2019 21:00:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DF8A2171F for ; Fri, 19 Apr 2019 21:00:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="zfbekhVF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbfDSVAM (ORCPT ); Fri, 19 Apr 2019 17:00:12 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:42720 "EHLO mail-qt1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbfDSVAM (ORCPT ); Fri, 19 Apr 2019 17:00:12 -0400 Received: by mail-qt1-f169.google.com with SMTP id p20so6589846qtc.9 for ; Fri, 19 Apr 2019 14:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=9373J7vN5GbqMfwJ7TyiLpvdjI+KWDaiG5feilrybJ0=; b=zfbekhVF0CVzBPV8Ja5XXQ3nnRR3CJ0Oomjd1BzaAt1MLf6XW94JJl7rfid4XLIkti 0T+AWS/ZaT/LAEOKEnBerDHSqkAz3uzRwTO1KZWNr9Ey7SuLfUYBzKQTv3w0FCOP071f tUNnmF0AQtW9zSnnWIuR3O8QyoB+FZFSQ5b1rwQq3ZIyLcifDak/WCq2gnwo1fcNJZ0c 6y7gD6DQQiPVjmNR1P+XepfuCkfqTxz1D3VWEJPfsvmdJ0IjHLazUdGCyIm9jHV+Q5BP TjGXYtJ5/mTv0TgppiX1/hgajnH+fozdZr12vHb9nsuC6Z0XieKFiViv2oNy/Yl0Vl+O 6oFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=9373J7vN5GbqMfwJ7TyiLpvdjI+KWDaiG5feilrybJ0=; b=B1H/vF4qkuSOoLVFIDSJH1ebEZOuOo1wKQA6EOS0Lwdkr+Ky7SnsJikdUI6YDe/Saa 0bH2WDmA1tsFSNnpdWfMPNVhNQQfCTEDnpD3BqZAKOXSgHQKYJdPjP3VzZeOBoN9VcB8 FKHkVJunyqy4ePoaE9wm+ysmYHi68AFpkuScguEcvsj2UMFJZ+o5jF3EeTAuige83Oh9 FF57Gun0VR3IBp8ALal11KXbmVXDdvzfonBwbD59IVdUWm/AcvokdwQNjcHafFr//lUY 3eqr3/FijpXu9+2w6h3RFDB22EFoZULgGcRHRWuqe9KyN/bNT8oSwOyYM/X0rjomcLLc bIeQ== X-Gm-Message-State: APjAAAXb7x9ibeBs5bqmxpjfRXffe96XKGx4DGonW6RHliUHmVtOnyDW XoJ+AqJgBTVxHsu3ZjVJg0nkiY27xb0= X-Google-Smtp-Source: APXvYqzchXYwzbVVf3nlfFjNY0AtuJAPSjsCqni7DPIAnI+79NGNHIGAt3FZi5tHElrwKAHHIdIm1w== X-Received: by 2002:ac8:2d41:: with SMTP id o1mr5286798qta.145.1555707610838; Fri, 19 Apr 2019 14:00:10 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id c207sm2993096qkg.14.2019.04.19.14.00.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Apr 2019 14:00:10 -0700 (PDT) Date: Fri, 19 Apr 2019 14:00:05 -0700 From: Jakub Kicinski To: Jiri Pirko Cc: netdev@vger.kernel.org, davem@davemloft.net, mlxsw@mellanox.com Subject: Re: [patch net-next rfc 00/15] netdevsim: impement proper device model Message-ID: <20190419140005.286d1f98@cakuba.netronome.com> In-Reply-To: <20190419052501.GA2247@nanopsycho> References: <20190413162112.8203-1-jiri@resnulli.us> <20190415122709.45dd4b09@cakuba.netronome.com> <20190416085937.GC2122@nanopsycho> <20190416110459.35b4b674@cakuba.netronome.com> <20190418072256.GA2196@nanopsycho.orion> <20190418100748.04efa546@cakuba.netronome.com> <20190419052501.GA2247@nanopsycho> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 19 Apr 2019 07:25:01 +0200, Jiri Pirko wrote: > >Hm.. I'm getting lost, sorry, I'm probably confusing myself here.. > > > >Netdevsim is supposed to test real, existing kernel interfaces and core > >code. What we do today with linking based on netdevs is quite simple > >and works very well for the BPF offload tests. > > > >If you want to test some devlink code, that's also real, perfect. > > > >For BPF tests we want the ability to add and remove netdevs to a sdev > >during tests, yes. That ability cannot be lost. > > Yeah, but since the api is changing, the original approach of using > IFLA_LINK cannot be used anymore. Not to mention is is abuse of the API > from the very beginning. You want to add/del ports during lifetime, I'm > trying to find interface. Basically whe have two options: > 1) devlink extension I suggested above > 2) sysfs files to add/del ports. Similar to "new_device" and > "del_device". > > I like the idea of having 2) better, the reason is this is very speficic > to netdevsim and not really applicable on real devices. Sure, if custom sysfs API is any better than the use of IFLA_LINK in a test mock up, go for it. Creating a custom devlink ABI for a test mockup netdev seems like a bad idea.