All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [RFC 2/2] shrink size of scatterlist on common i386/x86-64
Date: Thu, 05 Jul 2007 16:14:14 -0700	[thread overview]
Message-ID: <20070705231615.451797310@linux-foundation.org> (raw)
In-Reply-To: 20070705231412.021359760@linux-foundation.org

[-- Attachment #1: scatterlist-shrink.patch --]
[-- Type: text/plain, Size: 1032 bytes --]

The scatterlist only needs 16 bits for length/offset because
PAGE_SIZE is 4K

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>


--- a/include/asm-i386/scatterlist.h	2007-07-05 14:37:11.000000000 -0700
+++ b/include/asm-i386/scatterlist.h	2007-07-05 15:44:51.000000000 -0700
@@ -5,9 +5,9 @@
 
 struct scatterlist {
     struct page		*page;
-    unsigned int	offset;
     dma_addr_t		dma_address;
-    unsigned int	length;
+    u16			offset;
+    u16			length;
 };
 
 /* These macros should be used after a pci_map_sg call has been done
--- a/include/asm-x86_64/scatterlist.h	2007-07-05 14:37:11.000000000 -0700
+++ b/include/asm-x86_64/scatterlist.h	2007-07-05 15:46:49.000000000 -0700
@@ -5,10 +5,10 @@
 
 struct scatterlist {
     struct page		*page;
-    unsigned int	offset;
-    unsigned int	length;
     dma_addr_t		dma_address;
     unsigned int        dma_length;
+    u16			offset;
+    u16			length;
 };
 
 #define ISA_DMA_THRESHOLD (0x00ffffff)

-- 
Stephen Hemminger <shemminger@linux-foundation.org>


  parent reply	other threads:[~2007-07-05 23:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 23:14 [RFC 0/2] Convert skb to use scatterlist Stephen Hemminger
2007-07-05 23:14 ` [RFC 1/2] skbuff: " Stephen Hemminger
2007-07-05 23:14 ` Stephen Hemminger [this message]
2007-07-05 23:32   ` [RFC 2/2] shrink size of scatterlist on common i386/x86-64 Roland Dreier
2007-07-05 23:43   ` David Miller
2007-07-06  0:00     ` Stephen Hemminger
2007-07-06  0:15       ` David Miller
2007-07-06  7:43         ` Rusty Russell
2007-07-06  8:54           ` David Miller
2007-07-06 17:14         ` Williams, Mitch A
2007-07-06 19:20           ` David Miller
2007-07-08 16:17             ` Muli Ben-Yehuda
2007-07-09  7:06               ` David Miller
2007-07-09  8:53                 ` Muli Ben-Yehuda
2007-07-08 16:11           ` Muli Ben-Yehuda
2007-07-11 23:46             ` Williams, Mitch A

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=20070705231615.451797310@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --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.