From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Harald Mommer <harald.mommer@opensynergy.com>
Cc: virtio-dev@lists.oasis-open.org, linux-can@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Wolfgang Grandegger <wg@grandegger.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Dariusz Stojaczyk <Dariusz.Stojaczyk@opensynergy.com>,
Harald Mommer <hmo@opensynergy.com>
Subject: Re: [RFC PATCH 1/1] can: virtio: Initial virtio CAN driver.
Date: Sat, 27 Aug 2022 11:39:09 +0200 [thread overview]
Message-ID: <20220827093909.ag3zi7k525k4zuqq@pengutronix.de> (raw)
In-Reply-To: <20220825134449.18803-1-harald.mommer@opensynergy.com>
[-- Attachment #1: Type: text/plain, Size: 9086 bytes --]
On 25.08.2022 15:44:49, Harald Mommer wrote:
> - CAN Control
>
> - "ip link set up can0" starts the virtual CAN controller,
> - "ip link set up can0" stops the virtual CAN controller
>
> - CAN RX
>
> Receive CAN frames. CAN frames can be standard or extended, classic or
> CAN FD. Classic CAN RTR frames are supported.
>
> - CAN TX
>
> Send CAN frames. CAN frames can be standard or extended, classic or
> CAN FD. Classic CAN RTR frames are supported.
>
> - CAN Event indication (BusOff)
>
> The bus off handling is considered code complete but until now bus off
> handling is largely untested.
Is there an Open Source implementation of the host side of this
interface?
Please fix these checkpatch warnings:
| WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
| #65:
| new file mode 100644
|
| WARNING: Use #include <linux/atomic.h> instead of <asm/atomic.h>
| #105: FILE: drivers/net/can/virtio_can/virtio_can.c:7:
| +#include <asm/atomic.h>
|
| WARNING: __always_unused or __maybe_unused is preferred over __attribute__((__unused__))
| #186: FILE: drivers/net/can/virtio_can/virtio_can.c:88:
| +static void __attribute__((unused))
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #263: FILE: drivers/net/can/virtio_can/virtio_can.c:165:
| + BUG_ON(prio != 0); /* Currently only 1 priority */
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #264: FILE: drivers/net/can/virtio_can/virtio_can.c:166:
| + BUG_ON(atomic_read(&priv->tx_inflight[0]) >= priv->can.echo_skb_max);
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #279: FILE: drivers/net/can/virtio_can/virtio_can.c:181:
| + BUG_ON(prio >= VIRTIO_CAN_PRIO_COUNT);
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #280: FILE: drivers/net/can/virtio_can/virtio_can.c:182:
| + BUG_ON(idx >= priv->can.echo_skb_max);
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #281: FILE: drivers/net/can/virtio_can/virtio_can.c:183:
| + BUG_ON(atomic_read(&priv->tx_inflight[prio]) == 0);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #288: FILE: drivers/net/can/virtio_can/virtio_can.c:190:
| +/*
| + * Create a scatter-gather list representing our input buffer and put
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #309: FILE: drivers/net/can/virtio_can/virtio_can.c:211:
| +/*
| + * Send a control message with message type either
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #332: FILE: drivers/net/can/virtio_can/virtio_can.c:234:
| + /*
| + * The function may be serialized by rtnl lock. Not sure.
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #382: FILE: drivers/net/can/virtio_can/virtio_can.c:284:
| +/*
| + * See also m_can.c/m_can_set_mode()
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #408: FILE: drivers/net/can/virtio_can/virtio_can.c:310:
| +/*
| + * Called by issuing "ip link set up can0"
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #443: FILE: drivers/net/can/virtio_can/virtio_can.c:345:
| + /*
| + * Keep RX napi active to allow dropping of pending RX CAN messages,
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #481: FILE: drivers/net/can/virtio_can/virtio_can.c:383:
| + /*
| + * No local check for CAN_RTR_FLAG or FD frame against negotiated
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #521: FILE: drivers/net/can/virtio_can/virtio_can.c:423:
| + /*
| + * May happen if
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #533: FILE: drivers/net/can/virtio_can/virtio_can.c:435:
| + BUG_ON(can_tx_msg->putidx < 0);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #613: FILE: drivers/net/can/virtio_can/virtio_can.c:515:
| + /*
| + * Here also frames with result != VIRTIO_CAN_RESULT_OK are
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #646: FILE: drivers/net/can/virtio_can/virtio_can.c:548:
| +/*
| + * Poll TX used queue for sent CAN messages
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #675: FILE: drivers/net/can/virtio_can/virtio_can.c:577:
| +/*
| + * This function is the NAPI RX poll function and NAPI guarantees that this
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #698: FILE: drivers/net/can/virtio_can/virtio_can.c:600:
| + BUG_ON(len < header_size);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #813: FILE: drivers/net/can/virtio_can/virtio_can.c:715:
| +/*
| + * See m_can_poll() / m_can_handle_state_errors() m_can_handle_state_change().
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #855: FILE: drivers/net/can/virtio_can/virtio_can.c:757:
| +/*
| + * Poll RX used queue for received CAN messages
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #897: FILE: drivers/net/can/virtio_can/virtio_can.c:799:
| + /*
| + * The interrupt function is not assumed to be interrupted by
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #904: FILE: drivers/net/can/virtio_can/virtio_can.c:806:
| + BUG_ON(len < sizeof(struct virtio_can_event_ind));
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #966: FILE: drivers/net/can/virtio_can/virtio_can.c:868:
| + /*
| + * The order of RX and TX is exactly the opposite as in console and
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #976: FILE: drivers/net/can/virtio_can/virtio_can.c:878:
| + BUG_ON(!priv);
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #977: FILE: drivers/net/can/virtio_can/virtio_can.c:879:
| + BUG_ON(!priv->vdev);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1004: FILE: drivers/net/can/virtio_can/virtio_can.c:906:
| + /*
| + * From here we have dead silence from the device side so no locks
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1025: FILE: drivers/net/can/virtio_can/virtio_can.c:927:
| + /*
| + * Is keeping track of allocated elements by an own linked list
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #1060: FILE: drivers/net/can/virtio_can/virtio_can.c:962:
| + BUG_ON(!vdev);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1063: FILE: drivers/net/can/virtio_can/virtio_can.c:965:
| + /*
| + * CAN needs always access to the config space.
|
| WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
| #1090: FILE: drivers/net/can/virtio_can/virtio_can.c:992:
| + BUG_ON(!vdev);
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1144: FILE: drivers/net/can/virtio_can/virtio_can.c:1046:
| + /*
| + * It is possible to consider the number of TX queue places to
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1185: FILE: drivers/net/can/virtio_can/virtio_can.c:1087:
| +/*
| + * Compare with m_can.c/m_can_suspend(), virtio_net.c/virtnet_freeze() and
|
| WARNING: networking block comments don't use an empty /* line, use /* Comment...
| #1210: FILE: drivers/net/can/virtio_can/virtio_can.c:1112:
| +/*
| + * Compare with m_can.c/m_can_resume(), virtio_net.c/virtnet_restore() and
|
| WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
| #1273: FILE: drivers/net/can/virtio_can/virtio_can.c:1175:
| +MODULE_LICENSE("GPL v2");
|
| WARNING: From:/Signed-off-by: email address mismatch: 'From: Harald Mommer <harald.mommer@opensynergy.com>' != 'Signed-off-by: Harald Mommer <hmo@opensynergy.com>'
|
| total: 0 errors, 38 warnings, 1275 lines checked
regards,
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 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-08-27 9:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 13:44 [RFC PATCH 1/1] can: virtio: Initial virtio CAN driver Harald Mommer
2022-08-25 18:21 ` [virtio-dev] " Arnd Bergmann
2022-11-03 12:26 ` Harald Mommer
2022-11-04 10:50 ` Arnd Bergmann
2022-11-05 9:21 ` Vincent Mailhol
2023-05-12 13:19 ` Harald Mommer
2023-05-15 5:58 ` Vincent Mailhol
2023-05-23 13:39 ` Harald Mommer
2022-08-27 9:02 ` Oliver Hartkopp
2022-11-03 13:02 ` Harald Mommer
2022-08-27 9:39 ` Marc Kleine-Budde [this message]
2022-08-27 11:12 ` Oliver Hartkopp
2022-11-03 13:55 ` Harald Mommer
2022-11-04 15:32 ` [virtio-dev] " Jan Kiszka
2022-11-04 17:03 ` Arnd Bergmann
2023-02-03 15:02 ` Harald Mommer
2023-04-14 19:20 ` Marc Kleine-Budde
2023-04-18 9:50 ` Harald Mommer
2023-04-18 12:06 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220827093909.ag3zi7k525k4zuqq@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=Dariusz.Stojaczyk@opensynergy.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=harald.mommer@opensynergy.com \
--cc=hmo@opensynergy.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).