Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ced9e087
Commit
ced9e087
authored
Apr 06, 2003
by
James Morris
Committed by
David S. Miller
Apr 06, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: skb_headlen() cleanup.
parent
4357947c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
23 deletions
+23
-23
drivers/net/8139cp.c
drivers/net/8139cp.c
+1
-1
drivers/net/acenic.c
drivers/net/acenic.c
+1
-1
drivers/net/e100/e100_main.c
drivers/net/e100/e100_main.c
+2
-2
drivers/net/sungem.c
drivers/net/sungem.c
+1
-1
drivers/net/sunhme.c
drivers/net/sunhme.c
+1
-1
drivers/net/tg3.c
drivers/net/tg3.c
+6
-6
drivers/net/typhoon.c
drivers/net/typhoon.c
+1
-1
net/core/datagram.c
net/core/datagram.c
+2
-2
net/core/skbuff.c
net/core/skbuff.c
+5
-5
net/ipv4/tcp_output.c
net/ipv4/tcp_output.c
+1
-1
net/xfrm/xfrm_algo.c
net/xfrm/xfrm_algo.c
+2
-2
No files found.
drivers/net/8139cp.c
View file @
ced9e087
...
...
@@ -826,7 +826,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
* Otherwise we could race with the device.
*/
first_eor
=
eor
;
first_len
=
skb
->
len
-
skb
->
data_len
;
first_len
=
skb
_headlen
(
skb
)
;
first_mapping
=
pci_map_single
(
cp
->
pdev
,
skb
->
data
,
first_len
,
PCI_DMA_TODEVICE
);
cp
->
tx_skb
[
entry
].
skb
=
skb
;
...
...
drivers/net/acenic.c
View file @
ced9e087
...
...
@@ -2829,7 +2829,7 @@ static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev)
int
i
,
len
=
0
;
mapping
=
ace_map_tx_skb
(
ap
,
skb
,
NULL
,
idx
);
flagsize
=
(
(
skb
->
len
-
skb
->
data_len
)
<<
16
);
flagsize
=
(
skb_headlen
(
skb
)
<<
16
);
if
(
skb
->
ip_summed
==
CHECKSUM_HW
)
flagsize
|=
BD_FLG_TCP_UDP_SUM
;
#if ACENIC_DO_VLAN
...
...
drivers/net/e100/e100_main.c
View file @
ced9e087
...
...
@@ -2199,10 +2199,10 @@ e100_prepare_xmit_buff(struct e100_private *bdp, struct sk_buff *skb)
(
tcb
->
tbd_ptr
)
->
tbd_buf_addr
=
cpu_to_le32
(
pci_map_single
(
bdp
->
pdev
,
skb
->
data
,
(
skb
->
len
-
skb
->
data_len
),
skb_headlen
(
skb
),
PCI_DMA_TODEVICE
));
(
tcb
->
tbd_ptr
)
->
tbd_buf_cnt
=
cpu_to_le16
(
skb
->
len
-
skb
->
data_len
);
cpu_to_le16
(
skb
_headlen
(
skb
)
);
for
(
i
=
0
;
i
<
skb_shinfo
(
skb
)
->
nr_frags
;
i
++
,
tbd_arr_ptr
++
,
frag
++
)
{
...
...
drivers/net/sungem.c
View file @
ced9e087
...
...
@@ -894,7 +894,7 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* We must give this initial chunk to the device last.
* Otherwise we could race with the device.
*/
first_len
=
skb
->
len
-
skb
->
data_len
;
first_len
=
skb
_headlen
(
skb
)
;
first_mapping
=
pci_map_page
(
gp
->
pdev
,
virt_to_page
(
skb
->
data
),
((
unsigned
long
)
skb
->
data
&
~
PAGE_MASK
),
first_len
,
PCI_DMA_TODEVICE
);
...
...
drivers/net/sunhme.c
View file @
ced9e087
...
...
@@ -2319,7 +2319,7 @@ static int happy_meal_start_xmit(struct sk_buff *skb, struct net_device *dev)
/* We must give this initial chunk to the device last.
* Otherwise we could race with the device.
*/
first_len
=
skb
->
len
-
skb
->
data_len
;
first_len
=
skb
_headlen
(
skb
)
;
first_mapping
=
hme_dma_map
(
hp
,
skb
->
data
,
first_len
,
DMA_TODEVICE
);
entry
=
NEXT_TX
(
entry
);
...
...
drivers/net/tg3.c
View file @
ced9e087
...
...
@@ -1751,7 +1751,7 @@ static void tg3_tx(struct tg3 *tp)
pci_unmap_single
(
tp
->
pdev
,
pci_unmap_addr
(
ri
,
mapping
),
(
skb
->
len
-
skb
->
data_len
),
skb_headlen
(
skb
),
PCI_DMA_TODEVICE
);
ri
->
skb
=
NULL
;
...
...
@@ -2316,7 +2316,7 @@ static int tigon3_4gb_hwbug_workaround(struct tg3 *tp, struct sk_buff *skb,
int
len
;
if
(
i
==
0
)
len
=
skb
->
len
-
skb
->
data_len
;
len
=
skb
_headlen
(
skb
)
;
else
len
=
skb_shinfo
(
skb
)
->
frags
[
i
-
1
].
size
;
pci_unmap_single
(
tp
->
pdev
,
...
...
@@ -2401,7 +2401,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
int
would_hit_hwbug
;
unsigned
long
flags
;
len
=
(
skb
->
len
-
skb
->
data_len
);
len
=
skb_headlen
(
skb
);
/* No BH disabling for tx_lock here. We are running in BH disabled
* context and TX reclaim runs via tp->poll inside of a software
...
...
@@ -2520,7 +2520,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
i
=
0
;
while
(
entry
!=
last_plus_one
)
{
if
(
i
==
0
)
len
=
skb
->
len
-
skb
->
data_len
;
len
=
skb
_headlen
(
skb
)
;
else
len
=
skb_shinfo
(
skb
)
->
frags
[
i
-
1
].
size
;
...
...
@@ -2593,7 +2593,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
u32
len
,
entry
,
base_flags
,
mss
;
unsigned
long
flags
;
len
=
(
skb
->
len
-
skb
->
data_len
);
len
=
skb_headlen
(
skb
);
/* No BH disabling for tx_lock here. We are running in BH disabled
* context and TX reclaim runs via tp->poll inside of a software
...
...
@@ -2829,7 +2829,7 @@ static void tg3_free_rings(struct tg3 *tp)
pci_unmap_single
(
tp
->
pdev
,
pci_unmap_addr
(
txp
,
mapping
),
(
skb
->
len
-
skb
->
data_len
),
skb_headlen
(
skb
),
PCI_DMA_TODEVICE
);
txp
->
skb
=
NULL
;
...
...
drivers/net/typhoon.c
View file @
ced9e087
...
...
@@ -844,7 +844,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
}
else
{
int
i
,
len
;
len
=
skb
->
len
-
skb
->
data_len
;
len
=
skb
_headlen
(
skb
)
;
skb_dma
=
pci_map_single
(
tp
->
tx_pdev
,
skb
->
data
,
len
,
PCI_DMA_TODEVICE
);
txd
->
flags
=
TYPHOON_FRAG_DESC
|
TYPHOON_DESC_VALID
;
...
...
net/core/datagram.c
View file @
ced9e087
...
...
@@ -220,7 +220,7 @@ int skb_copy_datagram(const struct sk_buff *skb, int offset, char *to, int size)
int
skb_copy_datagram_iovec
(
const
struct
sk_buff
*
skb
,
int
offset
,
struct
iovec
*
to
,
int
len
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
i
,
copy
=
start
-
offset
;
/* Copy header. */
...
...
@@ -295,7 +295,7 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset,
int
skb_copy_and_csum_datagram
(
const
struct
sk_buff
*
skb
,
int
offset
,
u8
*
to
,
int
len
,
unsigned
int
*
csump
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
pos
=
0
;
int
i
,
copy
=
start
-
offset
;
...
...
net/core/skbuff.c
View file @
ced9e087
...
...
@@ -932,7 +932,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
int
skb_copy_bits
(
const
struct
sk_buff
*
skb
,
int
offset
,
void
*
to
,
int
len
)
{
int
i
,
copy
;
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
if
(
offset
>
(
int
)
skb
->
len
-
len
)
goto
fault
;
...
...
@@ -1009,7 +1009,7 @@ int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len)
unsigned
int
skb_checksum
(
const
struct
sk_buff
*
skb
,
int
offset
,
int
len
,
unsigned
int
csum
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
i
,
copy
=
start
-
offset
;
int
pos
=
0
;
...
...
@@ -1085,7 +1085,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
unsigned
int
skb_copy_and_csum_bits
(
const
struct
sk_buff
*
skb
,
int
offset
,
u8
*
to
,
int
len
,
unsigned
int
csum
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
i
,
copy
=
start
-
offset
;
int
pos
=
0
;
...
...
@@ -1170,9 +1170,9 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
if
(
skb
->
ip_summed
==
CHECKSUM_HW
)
csstart
=
skb
->
h
.
raw
-
skb
->
data
;
else
csstart
=
skb
->
len
-
skb
->
data_len
;
csstart
=
skb
_headlen
(
skb
)
;
if
(
csstart
>
skb
->
len
-
skb
->
data_len
)
if
(
csstart
>
skb
_headlen
(
skb
)
)
BUG
();
memcpy
(
to
,
skb
->
data
,
csstart
);
...
...
net/ipv4/tcp_output.c
View file @
ced9e087
...
...
@@ -354,7 +354,7 @@ void tcp_push_one(struct sock *sk, unsigned cur_mss)
static
void
skb_split
(
struct
sk_buff
*
skb
,
struct
sk_buff
*
skb1
,
u32
len
)
{
int
i
;
int
pos
=
skb
->
len
-
skb
->
data_len
;
int
pos
=
skb
_headlen
(
skb
)
;
if
(
len
<
pos
)
{
/* Split line is inside header. */
...
...
net/xfrm/xfrm_algo.c
View file @
ced9e087
...
...
@@ -445,7 +445,7 @@ int xfrm_count_enc_supported(void)
void
skb_icv_walk
(
const
struct
sk_buff
*
skb
,
struct
crypto_tfm
*
tfm
,
int
offset
,
int
len
,
icv_update_fn_t
icv_update
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
i
,
copy
=
start
-
offset
;
struct
scatterlist
sg
;
...
...
@@ -521,7 +521,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
int
skb_to_sgvec
(
struct
sk_buff
*
skb
,
struct
scatterlist
*
sg
,
int
offset
,
int
len
)
{
int
start
=
skb
->
len
-
skb
->
data_len
;
int
start
=
skb
_headlen
(
skb
)
;
int
i
,
copy
=
start
-
offset
;
int
elt
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment