Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2212257iof; Tue, 7 Jun 2022 23:21:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRID8wjd6ZRTqhKNaZNcR3QoLgRA33ku4TzLboFs04/hDTgml0bGVN1L0UDnHAHCIIja7L X-Received: by 2002:a63:2b8e:0:b0:3c6:b38b:a84 with SMTP id r136-20020a632b8e000000b003c6b38b0a84mr28907994pgr.422.1654669310592; Tue, 07 Jun 2022 23:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654669310; cv=none; d=google.com; s=arc-20160816; b=JGDL/eEaKfCdb33g9Qslj5SI9yWfcnyyDcII5T+1fBQWUJr8195sJp9tDiXajgzzAy 4LXANTwsMssOWru/CwXgJBsGJmKf4Ekoyk2n7spHizKX3ItLXFIWcJVBj43Vn7nxTtNC TUzjaeYIzg3XCZZsVDjh3F3K03wDYO2Kn2u60YEKxPmFCFZxK4PweHJXoiUu0kjZG8Rp NyV1ZFS5WuyPGnyzupFAJfZkCmbfDgoWqGzPZeoqxJ/RHHA3lkrx9Eg+U8CIXbnJuhNt f6fCs/yxP2mErE4JTWxVpOoNAbLh+AKqTwwfRMxWbFGL5nZy+fEanb2N00dbRTNl+Rsw Lp8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=0Dfqff6YnExhoYjE/SYcUz7DieGFt+8EIT8iwhQpv1w=; b=yZEStiu7ZLbVEBoaC/s7LZXeMeOUa/nJ8MYHSrXhvimb64COR4BHtZCAHePTW4zcb0 K5+SD9EXogjmIwNRRhV1r7PCwusoYTvds5pfawRsKPe9tzk2z20cl4Vx8+CvBp+wGjTG 0kamaBR9JdVxsIGKQCZCheY5aAhCdlLGak1X7xDGHeEjCqMLd4bp53Cvs2FInxNZT1LK EXrGnyqXNgOxB8qsgrqLG3WXtFQhD4kMo7mL3vt4bOmSGQ+S6enHMoF8Yx5NXXhVcAju YBvLk0ZeDJ0rn1yHl6HvYdEDu/CxesDvM/JWWBzReNN7Uad/CfHZw4cVIHKsJtvR3Vb6 3/vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x13-20020a170902ec8d00b00166031e366dsi14924752plg.175.2022.06.07.23.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4D2013C9678; Tue, 7 Jun 2022 22:42:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443123AbiFHCBx (ORCPT + 99 others); Tue, 7 Jun 2022 22:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1840875AbiFHAGQ (ORCPT ); Tue, 7 Jun 2022 20:06:16 -0400 Received: from mail.enpas.org (zhong.enpas.org [46.38.239.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 15A37C0380; Tue, 7 Jun 2022 16:55:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id BD8D1FFB6C; Tue, 7 Jun 2022 23:55:24 +0000 (UTC) Date: Wed, 8 Jun 2022 01:55:21 +0200 From: Max Staudt To: Vincent MAILHOL Cc: Dario Binacchi , linux-kernel@vger.kernel.org, Amarula patchwork , michael@amarulasolutions.com, "David S. Miller" , Eric Dumazet , Greg Kroah-Hartman , Jakub Kicinski , Jiri Slaby , Marc Kleine-Budde , Paolo Abeni , Sebastian Andrzej Siewior , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [RFC PATCH 00/13] can: slcan: extend supported features Message-ID: <20220608015521.1ad4853c.max@enpas.org> In-Reply-To: References: <20220607094752.1029295-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, 7 Jun 2022 21:19:54 +0900 Vincent MAILHOL wrote: > In his CAN327 driver, Max manages to bring the can0 device without the > need of dedicated user space daemon by using line discipline > (ldattach): > https://lore.kernel.org/linux-can/20220602213544.68273-1-max@enpas.org/ > > Isn't the same feasible with slcan so that we completely remove the > dependency toward slcand? > Max what do you think of this? I think it is a good idea to move this into the kernel driver. I don't have a slcan device, but a quick peek at its protocol suggests that it can be done much easier and cleaner than in can327. Fun fact: The use of a userspace "ignition" tool is a possible use case baked into can327's design ;) There is only one use case I can see for it though: Probing the ELM327's baud rate, and/or setting it before attaching the ldisc. This is the single thing that the kernel driver cannot do, since it is attached to an already running TTY, with a fixed speed. Everything else is configurable via "ip link". slcand could be used to auto-probe and set the baud rate as well. Then again, these stripped-down tools could likely be implemented as shell scripts calling stty and ldattach... Max