Skip to content

Commit 9ce0146

Browse files
ij1davem330
authored andcommitted
tcp: get rid of two unnecessary u16s in TCP skb flags copying
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>
1 parent 0d6a775 commit 9ce0146

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/ipv4/tcp_output.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
767767
struct sk_buff *buff;
768768
int nsize, old_factor;
769769
int nlen;
770-
u16 flags;
770+
u8 flags;
771771

772772
BUG_ON(len > skb->len);
773773

@@ -1282,7 +1282,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
12821282
{
12831283
struct sk_buff *buff;
12841284
int nlen = skb->len - len;
1285-
u16 flags;
1285+
u8 flags;
12861286

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

0 commit comments

Comments
 (0)