From: Jan Beulich <jbeulich@suse.com>
To: Juergen Gross <jgross@suse.com>
Cc: Wei Liu <wei.liu@kernel.org>, Paul Durrant <paul@xen.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH v2 3/3] xen/netback: use same error messages for same errors
Date: Tue, 28 Mar 2023 15:32:41 +0200 [thread overview]
Message-ID: <435f5ab4-e0ca-f66d-dc0d-0ed8633ed2e7@suse.com> (raw)
In-Reply-To: <20230328131233.2534-4-jgross@suse.com>
On 28.03.2023 15:12, Juergen Gross wrote:
> Issue the same error message in case an illegal page boundary crossing
> has been detected in both cases where this is tested.
>
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> V2:
> - new patch
> ---
> drivers/net/xen-netback/netback.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 9ca4b69d3b39..5dfdec44354a 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -996,10 +996,8 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue,
>
> /* No crossing a page as the payload mustn't fragment. */
> if (unlikely((txreq.offset + txreq.size) > XEN_PAGE_SIZE)) {
> - netdev_err(queue->vif->dev,
> - "txreq.offset: %u, size: %u, end: %lu\n",
> - txreq.offset, txreq.size,
> - (unsigned long)(txreq.offset&~XEN_PAGE_MASK) + txreq.size);
> + netdev_err(queue->vif->dev, "Cross page boundary, txp->offset: %u, size: %u\n",
> + txreq.offset, txreq.size);
> xenvif_fatal_tx_err(queue->vif);
> break;
> }
To be honest I'm of the opinion that this goes slightly too far:
Making the two messages more similar is certainly helpful. But in
case of problems I think it wouldn't hurt if they're still
distinguishable - when the one here triggers it may e.g also mean
that the calculation of the residual size is causing an issue. So
maybe stick to txreq.offset in the message text, with everything
else left as you have it?
Jan
next prev parent reply other threads:[~2023-03-28 13:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 13:10 [PATCH v2 0/3] xen/netback: fix issue introduced recently Juergen Gross
2023-03-28 13:12 ` [PATCH v2 1/3] xen/netback: don't do grant copy across page boundary Juergen Gross
2023-03-28 13:12 ` [PATCH v2 2/3] xen/netback: remove not needed test in xenvif_tx_build_gops() Juergen Gross
2023-03-28 13:12 ` [PATCH v2 3/3] xen/netback: use same error messages for same errors Juergen Gross
2023-03-28 13:32 ` Jan Beulich [this message]
2023-03-29 6:21 ` Juergen Gross
2023-03-28 13:30 ` [PATCH v2 0/3] xen/netback: fix issue introduced recently patchwork-bot+netdevbpf
2023-03-28 13:52 ` Paolo Abeni
2023-03-28 13:57 ` Jan Beulich
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=435f5ab4-e0ca-f66d-dc0d-0ed8633ed2e7@suse.com \
--to=jbeulich@suse.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgross@suse.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@xen.org \
--cc=wei.liu@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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
all inboxes | Powered by JetHome®