Message ID | 20230328131233.2534-4-jgross@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2215271vqo; Tue, 28 Mar 2023 06:26:08 -0700 (PDT) X-Google-Smtp-Source: AKy350Y5L2ABffWRH5MienZhdf0AmA9qCIgXIYWCYreQcrs7+hGKN32RPjGCtYv94Jl9Q25q8kiB X-Received: by 2002:aa7:ce19:0:b0:4fa:601a:3913 with SMTP id d25-20020aa7ce19000000b004fa601a3913mr15762538edv.27.1680009968056; Tue, 28 Mar 2023 06:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680009968; cv=none; d=google.com; s=arc-20160816; b=w872rY4UKv9lN8AxCrlQYc7wp+3ZjQ3pq3vUEXz2ZL1O9IemU3bGRJGaBsLzed0P7/ tKEEoa8DbxHb1WkCLsJFh8JS/E1sEDxbgyQexKiw8M1JlBOgcFc5zYO25RzvEoW0LyTT b1TxQS1mwqrc53JkKRkpaaS1/5Ra+wiFsiBnNMHjSsWBwRZr3iXVHnMZrw9BTVmw/rCO KmOMMxnDVMdFXPJQ6TiYfCczEDmp6RuVGGN3UbnYEsq439N975QCx4cQKZhnHQFBxKHz uRtwFCRSxE/uz0pUC5IX0RZvU8DLJa9UEHjALEU+AC9/IO57dP9QrsVyW2wnFsS9p7nU 4qCw== 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:date:subject:cc:to:from :dkim-signature; bh=e6vgelWHY1ROLaWG0osSVVXd0iuJBGBZOPQEJcLJre4=; b=C4+nflPVrDhftEFXBzHofgLold5NXDYviCKkTjDckWE3G5zeAW+DpCexufw3yUsDXV kzAjRVhFny+75vdcPNQRP84QvUawuBhkZ16aIGIkc6Y+y5z867EojyInCJtcvIgLe+/I TZaphkVR55MPyIv18VpQhFCETiKUd+PNCT3GvA2g7cSfEHNPYPoSRx04sUvaIUCR9GOo QLxyPu8fuGgSOW6tZ0Zxi5KoJK8/udb3hmDbSAm7lyBwUVrl6uhtFVAqzfMxETCGFm8H 7ycsjbLgbr8QDibBa5qEbZOypGlbgF2VJR7vh68ysw8JIG6xyybaz94y5GpwShbfiS06 CY7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=LFdM3W5z; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a056402115600b004fce4843227si29761857edw.328.2023.03.28.06.25.44; Tue, 28 Mar 2023 06:26:08 -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=@suse.com header.s=susede1 header.b=LFdM3W5z; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233104AbjC1NNa (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 28 Mar 2023 09:13:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233024AbjC1NNL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 28 Mar 2023 09:13:11 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6946893C7; Tue, 28 Mar 2023 06:13:10 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 26F491FD68; Tue, 28 Mar 2023 13:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1680009189; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e6vgelWHY1ROLaWG0osSVVXd0iuJBGBZOPQEJcLJre4=; b=LFdM3W5zZdqeRLZgZr7qTz4F8ur5guOoVem4nRZ5tsOfJdaBCOsiQzafNzRFzubTv7yfyb feDgbHO21RGAggkFmlAu9qVgUNQwRwRcMSErkykvTj3OpSc/KPkMlv24EVnN1IiuN5l4HP lBHqk0bOEMYvh57nwqVONSIthXtdbiA= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CEEE21390D; Tue, 28 Mar 2023 13:13:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5g83MeTnImRMTgAAMHmgww (envelope-from <jgross@suse.com>); Tue, 28 Mar 2023 13:13:08 +0000 From: Juergen Gross <jgross@suse.com> To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Juergen Gross <jgross@suse.com>, 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, Jan Beulich <jbeulich@suse.com> Subject: [PATCH v2 3/3] xen/netback: use same error messages for same errors Date: Tue, 28 Mar 2023 15:12:33 +0200 Message-Id: <20230328131233.2534-4-jgross@suse.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230328131047.2440-1-jgross@suse.com> References: <20230328131047.2440-1-jgross@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761618132117554382?= X-GMAIL-MSGID: =?utf-8?q?1761618132117554382?= |
Series |
xen/netback: fix issue introduced recently
|
|
Commit Message
Juergen Gross
March 28, 2023, 1:12 p.m. UTC
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(-)
Comments
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
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
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; }