From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 476DAC43603 for ; Mon, 9 Dec 2019 10:54:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23375207FD for ; Mon, 9 Dec 2019 10:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbfLIKyv (ORCPT ); Mon, 9 Dec 2019 05:54:51 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:55482 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727347AbfLIKyu (ORCPT ); Mon, 9 Dec 2019 05:54:50 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.3) (envelope-from ) id 1ieGgi-00FN4j-L6; Mon, 09 Dec 2019 11:54:48 +0100 Message-ID: Subject: Re: [PATCH] virtio: Work around frames incorrectly marked as gso From: Johannes Berg To: anton.ivanov@cambridgegreys.com, netdev@vger.kernel.org Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-um@lists.infradead.org, mst@redhat.com Date: Mon, 09 Dec 2019 11:54:46 +0100 In-Reply-To: <20191209104824.17059-1-anton.ivanov@cambridgegreys.com> References: <20191209104824.17059-1-anton.ivanov@cambridgegreys.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > else if (sinfo->gso_type & SKB_GSO_TCPV6) > hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; > - else > - return -EINVAL; > + else { > + if (skb->data_len == 0) > + hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; maybe use "else if" like in the before? yes, it's a different type of condition, but braces look a bit unnatural here to me at least johannes From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ieGgs-00054V-BB for linux-um@lists.infradead.org; Mon, 09 Dec 2019 10:55:00 +0000 Message-ID: Subject: Re: [PATCH] virtio: Work around frames incorrectly marked as gso From: Johannes Berg Date: Mon, 09 Dec 2019 11:54:46 +0100 In-Reply-To: <20191209104824.17059-1-anton.ivanov@cambridgegreys.com> References: <20191209104824.17059-1-anton.ivanov@cambridgegreys.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: anton.ivanov@cambridgegreys.com, netdev@vger.kernel.org Cc: jasowang@redhat.com, mst@redhat.com, linux-um@lists.infradead.org, virtualization@lists.linux-foundation.org > else if (sinfo->gso_type & SKB_GSO_TCPV6) > hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6; > - else > - return -EINVAL; > + else { > + if (skb->data_len == 0) > + hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE; maybe use "else if" like in the before? yes, it's a different type of condition, but braces look a bit unnatural here to me at least johannes _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um