File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 22#ifndef _TSO_H
33#define _TSO_H
44
5+ #include <linux/skbuff.h>
56#include <net/ip.h>
67
78#define TSO_HEADER_SIZE 256
@@ -16,7 +17,12 @@ struct tso_t {
1617 u32 tcp_seq ;
1718};
1819
19- int tso_count_descs (const struct sk_buff * skb );
20+ /* Calculate the worst case buffer count */
21+ static inline int tso_count_descs (const struct sk_buff * skb )
22+ {
23+ return skb_shinfo (skb )-> gso_segs * 2 + skb_shinfo (skb )-> nr_frags ;
24+ }
25+
2026void tso_build_hdr (const struct sk_buff * skb , char * hdr , struct tso_t * tso ,
2127 int size , bool is_last );
2228void tso_build_data (const struct sk_buff * skb , struct tso_t * tso , int size );
Original file line number Diff line number Diff line change 55#include <net/tso.h>
66#include <asm/unaligned.h>
77
8- /* Calculate expected number of TX descriptors */
9- int tso_count_descs (const struct sk_buff * skb )
10- {
11- /* The Marvell Way */
12- return skb_shinfo (skb )-> gso_segs * 2 + skb_shinfo (skb )-> nr_frags ;
13- }
14- EXPORT_SYMBOL (tso_count_descs );
15-
168void tso_build_hdr (const struct sk_buff * skb , char * hdr , struct tso_t * tso ,
179 int size , bool is_last )
1810{
You can’t perform that action at this time.
0 commit comments