udp: remove unreachable ufo branches
authorWillem de Bruijn <willemb@google.com>
Tue, 22 Aug 2017 15:39:57 +0000 (11:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Aug 2017 21:27:18 +0000 (14:27 -0700)
Remove two references to ufo in the udp send path that are no longer
reachable now that ufo has been removed.

Commit 85f1bd9a7b5a ("udp: consistently apply ufo or fragmentation")
is a fix to ufo. It is safe to revert what remains of it.

Also, no skb can enter ip_append_page with skb_is_gso true now that
skb_shinfo(skb)->gso_type is no longer set in ip_append_page/_data.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv4/udp.c

index 73b0b15245b62f6d674e289422a203cef2951e43..e8e675be60ec0044007c660bae1bb4d12c9a484e 100644 (file)
@@ -1223,15 +1223,11 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
        cork->length += size;
 
        while (size > 0) {
-               if (skb_is_gso(skb)) {
-                       len = size;
-               } else {
+               /* Check if the remaining data fits into current packet. */
+               len = mtu - skb->len;
+               if (len < size)
+                       len = maxfraglen - skb->len;
 
-                       /* Check if the remaining data fits into current packet. */
-                       len = mtu - skb->len;
-                       if (len < size)
-                               len = maxfraglen - skb->len;
-               }
                if (len <= 0) {
                        struct sk_buff *skb_prev;
                        int alloclen;
index 25fb14490d6a9d47811f1cef17095b8cb1c27332..bf6c406bf5e71f0200fcfc1439c48e2843fae6c2 100644 (file)
@@ -809,7 +809,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4)
        if (is_udplite)                                  /*     UDP-Lite      */
                csum = udplite_csum(skb);
 
-       else if (sk->sk_no_check_tx && !skb_is_gso(skb)) {   /* UDP csum off */
+       else if (sk->sk_no_check_tx) {                   /* UDP csum off */
 
                skb->ip_summed = CHECKSUM_NONE;
                goto send;