Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp2140574rwl; Sat, 5 Nov 2022 02:39:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64K8W00CEIhkbL1LFaT0TtgwtakgZJDh98M0jFK8hruEaiqNAYxYzHTHyg6B7NmIPE0rLC X-Received: by 2002:a05:6402:f24:b0:461:7c77:98c4 with SMTP id i36-20020a0564020f2400b004617c7798c4mr38584513eda.80.1667641150972; Sat, 05 Nov 2022 02:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667641150; cv=none; d=google.com; s=arc-20160816; b=u0TONgDXklzLKEIUA2Dg8ApcuKs/NWDpvMQDBfLctUzDZPaQ3DzOaHUoaS+6K/ZC25 ct96tlgM9jZxNu3/F19xm2yJFDB3PFoDAUIUAxN2jvP3jXuQz/9r+1/htnyrWISZXsPi zy/FlUjYAnkmJVFjA3/QDyVwO7nzD5cv+7WZZPLHTSe93U6DMAaIrCO5IGBuKU4UiFBj VXdBKZgYDtJ23/V3ITWN+W7MLxVq/3Gu+WmVT+2CqDKCD0DyH4MaSP7avf3JiFtI/GJC 4bEWklihOdk+JQH3CoWiaT05Ra17D+fh91Dj4t5w/cpGNGPCIzx70DeBdAxKX57e0eRE BpTA== 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=Ku7tg7vlTu+0wtrHVbGpGhCA4LfoCHMdGfBR8gpdZlk=; b=R/8yUvMvczjSPULfIQ+Rs8T0C4kxvQG7tKiD758KDvPHyC3VXVphGFbupjRl4yXRNL cPhsc8cX2F/2+ImzsLLkNqa4KpVrOo+ZsHxEqtpU2tq6ZW0wtm77p1kgSjcjvS7sUPmf Kt8NGVm54x+GEVbxvCp3/yObcxOmJ6UJyKZWWGqcbqOqbRTQy6lhRrusb/yMNfPCcaug d3CBMyyD7ByFFvGOH4yOZCPleaWX4KGJFjTb5VXTUENC2CEQNX9caX39CmfdZSdzlr1R Np3iV4Yud3i4mXPxcwNzDplyjMq9xUfLP8kf5TqfZKSutZMd/m/I+kQFHSCXoIeSYyi4 f9og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ENA9IBJJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs17-20020a1709072d1100b0078da5f6ed9esi2142546ejc.779.2022.11.05.02.38.45; Sat, 05 Nov 2022 02:39:10 -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=@gmail.com header.s=20210112 header.b=ENA9IBJJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229642AbiKEJWL (ORCPT + 99 others); Sat, 5 Nov 2022 05:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiKEJWK (ORCPT ); Sat, 5 Nov 2022 05:22:10 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B26BC2CCA5; Sat, 5 Nov 2022 02:22:06 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id r61-20020a17090a43c300b00212f4e9cccdso10259904pjg.5; Sat, 05 Nov 2022 02:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ku7tg7vlTu+0wtrHVbGpGhCA4LfoCHMdGfBR8gpdZlk=; b=ENA9IBJJsYC3zZTHu+0cQxuLi2znIha99DuKnef32a5MS2H1mJNuu9E8PLSGoQq+Rl jPnxVErqC+8XytlaLlOPADQ0krIDVM068yPfOoafiNudxcOKfdgAmpmLch3XTWddiaK9 xDcT30qUR33gfdXDSrNcVvw1GTdaiXfDlZry0ZvqyZxRdP9nvDZsROzFeIKMttxfPg4w qqW6F9dd3+TtMzzQUhHvbgQBK1iab7670NE+WgaTeivquXTKjxMyLH6uwCWPtTvlFSpe CDR/HJ9vELySVeuPLjiW/ZuQ5WHWWLksbRQtDRCmWmSg/EE04s4GALULEJc0S7f6UJLU p4Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ku7tg7vlTu+0wtrHVbGpGhCA4LfoCHMdGfBR8gpdZlk=; b=tSr1iewXNFls2rFrjJU9R02s6SBKRYc/1EoUpwmM0jw3H1+c+q9Yt2r3H0QRLJkUTS XfoYClIJEuKjmWfUnUtDX8bFLfFwKYOMCnfCuqn/KZx/Qx924zDaYpF55fII7U/x+CUv E/X2+HjiGCgVdb4wnRgCpEgt/0c1pdRzuM76YB8fuo8UmCg5tTpa9ewd72LsSJpIl1fv b/MiOH3/PEswXbEnhDlyJ7KyGfgoePqPA4HzdpCGYMvu0W0gy8GwG7YG2bU5dkcfi+8W KhNAFBKRfRU3CDZmOXnrWMrrydooKAi6o+oQWboSGB2arJmTKgwG4sDjqNytQQdZvgg9 SAqg== X-Gm-Message-State: ACrzQf1N4V+0KYhuxQtR67E0xnq8/Oa79fQDMf5wWIZmP1xwDWIQDa26 grspZ/1njI0gQ/KwVN+twKjKGV0pUYASOTGIb5k= X-Received: by 2002:a17:903:185:b0:187:2430:d39e with SMTP id z5-20020a170903018500b001872430d39emr30261014plg.65.1667640126233; Sat, 05 Nov 2022 02:22:06 -0700 (PDT) MIME-Version: 1.0 References: <20220825134449.18803-1-harald.mommer@opensynergy.com> <8bd1dc3b-e1f0-e7f9-bf65-8d243c65adb5@opensynergy.com> In-Reply-To: From: Vincent Mailhol Date: Sat, 5 Nov 2022 18:21:55 +0900 Message-ID: Subject: Re: [virtio-dev] [RFC PATCH 1/1] can: virtio: Initial virtio CAN driver. To: Arnd Bergmann Cc: Harald Mommer , Harald Mommer , virtio-dev@lists.oasis-open.org, linux-can@vger.kernel.org, Netdev , linux-kernel@vger.kernel.org, Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Dariusz Stojaczyk , Stratos Mailing List 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fry. 4 nov. 2022 at 20:13, Arnd Bergmann wrote: > On Thu, Nov 3, 2022, at 13:26, Harald Mommer wrote: > > On 25.08.22 20:21, Arnd Bergmann wrote: > >> > ... > > The messages are not necessarily processed in sequence by the CAN stack. > > CAN is priority based. The lower the CAN ID the higher the priority. So > > a message with CAN ID 0x100 can surpass a message with ID 0x123 if the > > hardware is not just simple basic CAN controller using a single TX > > mailbox with a FIFO queue on top of it. Really? I acknowledge that it is priority based *on the bus*, i.e. if two devices A and B on the same bus try to send CAN ID 0x100 and 0x123 at the same time, then device A will win the CAN arbitration. However, I am not aware of any devices which reorder their own stack according to the CAN IDs. If I first send CAN ID 0x123 and then ID 0x100 on the device stack, 0x123 would still go out first, right? > > Thinking about this the code becomes more complex with the array. What I > > get from the device when the message has been processed is a pointer to > > the processed message by virtqueue_get_buf(). I can then simply do a > > list_del(), free the message and done. > > Ok