Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp631575imn; Tue, 26 Jul 2022 05:32:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sF/TmY9Pz6lu2YdD4wmWdIM2RnMV8644+Ct6e+041iOduTnUaGVWspbAPPetOG/SKTw4lK X-Received: by 2002:a05:6402:298a:b0:43a:76f8:a75c with SMTP id eq10-20020a056402298a00b0043a76f8a75cmr18669336edb.216.1658838737883; Tue, 26 Jul 2022 05:32:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658838737; cv=none; d=google.com; s=arc-20160816; b=qXJeton0e3zNtXlB7MiuLMDnQRaQZ4fqmXJOSXqc6JFRsoUigL1oDjXMrh1kVbhhdp rAS7pulUCY0fBA9imFScJindEvT1XAs5anVBKhlG12HV2Km+7ZWZpwrxoBN7QY9JspMO 7sRhuAYQWDuP8AaxN7etDRjWwbVdGeRKPLHaD2mjGN6iZWxdwMbnvuM+6waGOjhaDgo9 fOxoIF5hOPF9HLfvZQqW5UA+GXZ45BmaHtg+bD7fLonWIN9HSgAhmq0+Urlavoidpjyk 3cLULVnjp/vGZ+Q6+IgqjDHAkp7C+NS1OezEbw64sP5cMT49eAO8DI1a0s2dLwAH3Zsn EBmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DRdMkVO45kt5SUq2iTSwOTuiugVw1ePTDCKNo3/Lr2Q=; b=cSgaC6eSD3rTPKWv0fN53hbBSi8+mEavxHqE2N87Wusqpn/3rFJ+LhhuvNuSEBndhf XDeBCU4Z0caqIEgzCPE5vymq5XIQyX9ltZ5VEggCn6DrtKBCYec83cGIBKq1AHZnpR5b ZghhV1Pu8IB35QPbBxc/NF1d9dpYffqB/dQV3ukJlP8k0HQ1xdkeUNdjDzDkm2iyj6GU mtPlf9O7EqY+u+eC51NjtV0WiiQTixnifv+Pdg+528a5XzSvRAlJhcTHn5ZjJzU9DwZe AfWmiVPulUoO5uruiHHWxQRNfmgiK6TYauYkAel7eudYbHXBVO0g8EfBo7CNPig6UYW3 C3BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PWpNy38u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a17090629c500b0072694ef6015si13862269eje.233.2022.07.26.05.31.53; Tue, 26 Jul 2022 05:32:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PWpNy38u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238983AbiGZMME (ORCPT + 99 others); Tue, 26 Jul 2022 08:12:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238600AbiGZMMD (ORCPT ); Tue, 26 Jul 2022 08:12:03 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FB992B1AD for ; Tue, 26 Jul 2022 05:12:01 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id y11so22187942lfs.6 for ; Tue, 26 Jul 2022 05:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DRdMkVO45kt5SUq2iTSwOTuiugVw1ePTDCKNo3/Lr2Q=; b=PWpNy38u+kmxcyNOBTsonapbCAkL3cJaMR4mqtXCM6PBsg1pnSlLojXIouR2HEm4gc nQGRcdQhBEPSk7FemlfLMu2vuyGtyK9kGUQqImx3Jjqtd7THFBIPliuzj9VeIUclriS4 pKb7YBTkwl30kCjGoqQ6zki5lcHDMdlsHMpwQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DRdMkVO45kt5SUq2iTSwOTuiugVw1ePTDCKNo3/Lr2Q=; b=uA/a58aRtzvnX7LD6Dkk1yldmZ3vNzqxJQ24zI+Qk5VRK1u39PezFYRJqti805KFpH 0MGf4eq1+hrwjxScdizPdGs2lKEwaxxHLm8Uzc4WeIQCR6hJRtckIDhPxCF+yBY9Qlsw PV7v8bVx14rfxCMiolZ95934tTmKGEc3dfwNNpGkcnRiL0H+9IIp0JBbUhPn2/kOusXb 6LD/+wvs3IDhmJW7a5jAVcVDsJmCZBB57fAQPzk+v6dTuxYL0wERM0vRaKV3RV9EuVEg cYqLp+/3GjJGgleGiq9MkUpDy3YmdJ5WA5lvexebbauvMfCpx7qp4dPhK4Ix0zASe+qb gWwg== X-Gm-Message-State: AJIora/xcm8xhMHuUi7RguytWwP3yRCeS2QlBnLc8OOw1yZIVcjX9ZJT 3a1nyZ0gwQH3fTWQ7fw3zhUVc3F5YozpZ8bWJy5XRg== X-Received: by 2002:a05:6512:32c2:b0:48a:9822:ca2c with SMTP id f2-20020a05651232c200b0048a9822ca2cmr2540199lfg.117.1658837519793; Tue, 26 Jul 2022 05:11:59 -0700 (PDT) MIME-Version: 1.0 References: <20220725065419.3005015-1-dario.binacchi@amarulasolutions.com> <20220725065419.3005015-3-dario.binacchi@amarulasolutions.com> <20220725123804.ofqpq4j467qkbtzn@pengutronix.de> <20220726115845.4ywgubfpqfbl7qa3@pengutronix.de> In-Reply-To: <20220726115845.4ywgubfpqfbl7qa3@pengutronix.de> From: Dario Binacchi Date: Tue, 26 Jul 2022 14:11:48 +0200 Message-ID: Subject: Re: [PATCH v2 2/6] can: slcan: remove legacy infrastructure To: Marc Kleine-Budde Cc: linux-kernel@vger.kernel.org, michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Max Staudt , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 26, 2022 at 1:58 PM Marc Kleine-Budde wrote: > > On 26.07.2022 12:11:33, Dario Binacchi wrote: > > Hello Marc, > > > > On Mon, Jul 25, 2022 at 2:38 PM Marc Kleine-Budde wrote: > > > > > > On 25.07.2022 08:54:15, Dario Binacchi wrote: > > > > Taking inspiration from the drivers/net/can/can327.c driver and at the > > > > suggestion of its author Max Staudt, I removed legacy stuff like > > > > `SLCAN_MAGIC' and `slcan_devs' resulting in simplification of the code > > > > and its maintainability. > > > > > > > > The use of slcan_devs is derived from a very old kernel, since slip.c > > > > is about 30 years old, so today's kernel allows us to remove it. > > > > > > > > The .hangup() ldisc function, which only called the ldisc .close(), has > > > > been removed since the ldisc layer calls .close() in a good place > > > > anyway. > > > > > > > > The old slcanX name has been dropped in order to use the standard canX > > > > interface naming. It has been assumed that this change does not break > > > > the user space as the slcan driver provides an ioctl to resolve from tty > > > > fd to netdev name. > > > > > > Is there a man page that documents this iotcl? Please add it and/or the > > > IOCTL name. > > > > I have not found documentation of the SIOCGIFNAME ioctl for the line discipline, > > but only for netdev (i. e. > > https://man7.org/linux/man-pages/man7/netdevice.7.html), > > Ok - What about: > > The old slcanX name has been dropped in order to use the standard canX > interface naming. The ioctl SIOCGIFNAME can be used to query the name of > the created interface. Further There are several ways to get stable > interfaces names in user space, e.g. udev or systemd-networkd. Good! I will update the commit message in the next version I will submit. Thanks and regards, Dario > > Marc > > -- > Pengutronix e.K. | Marc Kleine-Budde | > Embedded Linux | https://www.pengutronix.de | > Vertretung West/Dortmund | Phone: +49-231-2826-924 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- Dario Binacchi Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com