Message ID | 1370563643-19556-1-git-send-email-dborkman@redhat.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Fri, 2013-06-07 at 02:07 +0200, Daniel Borkmann wrote: > We have the minimal inline helper tcp_skb_mss to access > skb_shinfo(skb)->gso_size, so also use it here to get mss. > > Signed-off-by: Daniel Borkmann <dborkman@redhat.com> > --- > net/ipv4/tcp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index b5d4ad9..6a1cf95 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -2905,7 +2905,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, > oldlen = (u16)~skb->len; > __skb_pull(skb, thlen); > > - mss = skb_shinfo(skb)->gso_size; > + mss = tcp_skb_mss(skb); Conceptually, this is part of the GRO/GSO layer. It would be nice to move this stuff in net/ipv4/tcp_offload.c to makes things explicit. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 06/07/2013 03:20 AM, Eric Dumazet wrote: > On Fri, 2013-06-07 at 02:07 +0200, Daniel Borkmann wrote: >> We have the minimal inline helper tcp_skb_mss to access >> skb_shinfo(skb)->gso_size, so also use it here to get mss. >> >> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> >> --- >> net/ipv4/tcp.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c >> index b5d4ad9..6a1cf95 100644 >> --- a/net/ipv4/tcp.c >> +++ b/net/ipv4/tcp.c >> @@ -2905,7 +2905,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, >> oldlen = (u16)~skb->len; >> __skb_pull(skb, thlen); >> >> - mss = skb_shinfo(skb)->gso_size; >> + mss = tcp_skb_mss(skb); > > Conceptually, this is part of the GRO/GSO layer. > > It would be nice to move this stuff in net/ipv4/tcp_offload.c > to makes things explicit. Agreed, will do. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b5d4ad9..6a1cf95 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2905,7 +2905,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, oldlen = (u16)~skb->len; __skb_pull(skb, thlen); - mss = skb_shinfo(skb)->gso_size; + mss = tcp_skb_mss(skb); if (unlikely(skb->len <= mss)) goto out; @@ -3071,7 +3071,7 @@ found: flush |= *(u32 *)((u8 *)th + i) ^ *(u32 *)((u8 *)th2 + i); - mss = skb_shinfo(p)->gso_size; + mss = tcp_skb_mss(p); flush |= (len - 1) >= mss; flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq);
We have the minimal inline helper tcp_skb_mss to access skb_shinfo(skb)->gso_size, so also use it here to get mss. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> --- net/ipv4/tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)