Skip to content

Commit

Permalink
xen/netback: use same error messages for same errors
Browse files Browse the repository at this point in the history
[ Upstream commit 2eca98e ]

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>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Link: https://lore.kernel.org/r/20230329080259.14823-1-jgross@suse.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jgross1 authored and gregkh committed Apr 26, 2023
1 parent 79d22fa commit bbf4d72
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/xen-netback/netback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, txreq.offset: %u, size: %u\n",
txreq.offset, txreq.size);
xenvif_fatal_tx_err(queue->vif);
break;
}
Expand Down

0 comments on commit bbf4d72

Please sign in to comment.