mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <jbeulich@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: Wed, 29 Mar 2023 08:21:29 +0200	[thread overview]
Message-ID: <e518732c-3104-9263-f484-a8b374ac604d@suse.com> (raw)
In-Reply-To: <435f5ab4-e0ca-f66d-dc0d-0ed8633ed2e7@suse.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1783 bytes --]

On 28.03.23 15:32, Jan Beulich wrote:
> 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?

Fine with me.


Juergen


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2023-03-29  6:21 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
2023-03-29  6:21     ` Juergen Gross [this message]
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=e518732c-3104-9263-f484-a8b374ac604d@suse.com \
    --to=jgross@suse.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jbeulich@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®