Skip to content

Commit

Permalink
tcp: get rid of two unnecessary u16s in TCP skb flags copying
Browse files Browse the repository at this point in the history
I guess these fields were one day 16-bit in the struct but
nowadays they're just using 8 bits anyway.

This is just a precaution, didn't result any change in my
case but who knows what all those varying gcc versions &
options do. I've been told that 16-bit is not so nice with
some cpus.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Mar 2, 2009
1 parent 0d6a775 commit 9ce0146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
struct sk_buff *buff;
int nsize, old_factor;
int nlen;
u16 flags;
u8 flags;

BUG_ON(len > skb->len);

Expand Down Expand Up @@ -1282,7 +1282,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
{
struct sk_buff *buff;
int nlen = skb->len - len;
u16 flags;
u8 flags;

/* All of a TSO frame must be composed of paged data. */
if (skb->len != skb->data_len)
Expand Down

0 comments on commit 9ce0146

Please sign in to comment.