| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-std=gnu17 -O -w" } */ |
| 3 |
|
| 4 |
struct skb_shared_info { |
| 5 |
short gso_size; |
| 6 |
}; |
| 7 |
|
| 8 |
enum { NETDEV_TX_OK }; |
| 9 |
|
| 10 |
struct iphdr { |
| 11 |
short tot_len; |
| 12 |
int daddr; |
| 13 |
}; |
| 14 |
|
| 15 |
int tg3_tso_bug(); |
| 16 |
int netdev_priv(); |
| 17 |
int skb_cow_head(); |
| 18 |
int tcp_hdrlen__builtin_expect(); |
| 19 |
struct iphdr *ip_hdr(); |
| 20 |
int _tg3_flag(); |
| 21 |
int tg3_tso_bug_gso_check(); |
| 22 |
|
| 23 |
int |
| 24 |
tg3_start_xmit() { |
| 25 |
int *tp = (int *) netdev_priv(); |
| 26 |
int mss, tnapi; |
| 27 |
struct iphdr *iph; |
| 28 |
tnapi = mss = ((struct skb_shared_info *)0)->gso_size; |
| 29 |
if (mss) { |
| 30 |
int hdr_len; |
| 31 |
if (skb_cow_head()) |
| 32 |
iph = ip_hdr(); |
| 33 |
hdr_len = tcp_hdrlen__builtin_expect() && _tg3_flag(); |
| 34 |
if (tg3_tso_bug_gso_check()) |
| 35 |
return tg3_tso_bug(tp, tnapi); |
| 36 |
iph->tot_len = mss + hdr_len; |
| 37 |
if (_tg3_flag(tp) || tp) |
| 38 |
; |
| 39 |
else |
| 40 |
asm("" : : "g"(iph->daddr)); |
| 41 |
} |
| 42 |
return 0; |
| 43 |
} |