All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] ipv6:  Paritially checksum full MTU frames
@ 2017-01-30  3:52 Vladislav Yasevich
  2017-01-30 20:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vladislav Yasevich @ 2017-01-30  3:52 UTC (permalink / raw)
  To: netdev; +Cc: Vladislav Yasevich

IPv6 will mark data that is smaller that mtu - headersize as
CHECKSUM_PARTIAL, but if the data will completely fill the mtu,
the packet checksum will be computed in software instead.
Extend the conditional to include the data that fills the mtu
as well.

Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
 net/ipv6/ip6_output.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 2c0df09..b6a94ff 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1344,7 +1344,7 @@ static int __ip6_append_data(struct sock *sk,
 	 */
 	if (transhdrlen && sk->sk_protocol == IPPROTO_UDP &&
 	    headersize == sizeof(struct ipv6hdr) &&
-	    length < mtu - headersize &&
+	    length <= mtu - headersize &&
 	    !(flags & MSG_MORE) &&
 	    rt->dst.dev->features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM))
 		csummode = CHECKSUM_PARTIAL;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] ipv6: Paritially checksum full MTU frames
  2017-01-30  3:52 [PATCH net] ipv6: Paritially checksum full MTU frames Vladislav Yasevich
@ 2017-01-30 20:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-30 20:51 UTC (permalink / raw)
  To: vyasevich; +Cc: netdev, vyasevic

From: Vladislav Yasevich <vyasevich@gmail.com>
Date: Sun, 29 Jan 2017 22:52:53 -0500

> IPv6 will mark data that is smaller that mtu - headersize as
> CHECKSUM_PARTIAL, but if the data will completely fill the mtu,
> the packet checksum will be computed in software instead.
> Extend the conditional to include the data that fills the mtu
> as well.
> 
> Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>

Looks good, applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-30 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30  3:52 [PATCH net] ipv6: Paritially checksum full MTU frames Vladislav Yasevich
2017-01-30 20:51 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.