All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Prindeville <philipp_subx@redfish-solutions.com>
To: Netdev <netdev@vger.kernel.org>
Cc: Karl Hiramoto <karl@hiramoto.org>,
	Nathan Williams <nathan@traverse.com.au>,
	chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Subject: [PATCH 2/2] solos-pci: Don't include pseudo-header in dump of frame
Date: Mon, 28 Mar 2011 00:01:14 -0700	[thread overview]
Message-ID: <4D90323A.8020406@redfish-solutions.com> (raw)

From: Philip Prindeville <philipp@redfish-solutions.com>

Don't include pseudo-header as part of frame hex-dump on transmit. We can pull-up the "struct pkt_hdr" at the
beginning of the sk_buff because it's already been used, and shouldn't be included in the output of print_buffer(),
which is the last operation we'll do on the contents of this buffer before releasing it.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
---
  drivers/atm/solos-pci.c |    9 ++++++++-
  1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 2c4146a..968f022 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -697,7 +697,7 @@ void solos_bh(unsigned long card_arg)
  					      size);
  			}
  			if (atmdebug) {
-				dev_info(&card->dev->dev, "Received: device %d\n", port);
+				dev_info(&card->dev->dev, "Received: port %d\n", port);
  				dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
  					 size, le16_to_cpu(header->vpi),
  					 le16_to_cpu(header->vci));
@@ -1018,8 +1018,15 @@ static uint32_t fpga_tx(struct solos_card *card)

  			/* Clean up and free oldskb now it's gone */
  			if (atmdebug) {
+				struct pkt_hdr *header = (void *)oldskb->data;
+				int size = le16_to_cpu(header->size);
+
+				skb_pull(oldskb, sizeof(*header));
  				dev_info(&card->dev->dev, "Transmitted: port %d\n",
  					 port);
+				dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
+					 size, le16_to_cpu(header->vpi),
+					 le16_to_cpu(header->vci));
  				print_buffer(oldskb);
  			}




             reply	other threads:[~2011-03-28  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28  7:01 Philip Prindeville [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-28  5:21 [PATCH 2/2] solos-pci:Don't include pseudo-header in dump of frame Philip Prindeville
2011-03-28  6:30 ` David Miller

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=4D90323A.8020406@redfish-solutions.com \
    --to=philipp_subx@redfish-solutions.com \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=karl@hiramoto.org \
    --cc=nathan@traverse.com.au \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.