From patchwork Tue Oct 4 09:29:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 9361533 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3C98608A6 for ; Tue, 4 Oct 2016 09:52:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B31C2287EF for ; Tue, 4 Oct 2016 09:52:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A82952896A; Tue, 4 Oct 2016 09:52:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 355D428968 for ; Tue, 4 Oct 2016 09:52:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brMLS-0006EK-KW; Tue, 04 Oct 2016 09:49:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brMLR-0006DK-DN for xen-devel@lists.xenproject.org; Tue, 04 Oct 2016 09:49:05 +0000 Received: from [193.109.254.147] by server-5.bemta-6.messagelabs.com id DF/B7-29563-01B73F75; Tue, 04 Oct 2016 09:49:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXitHSDva5A9ed wg1NbeS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owp75rYC06rVJy48ZOpgfGzXBcjJ4eEgL/E 5RXTmEBsNgEdialPL7GC2CICdhKXNh9g72Lk4GAW8JTouWUOEhYWCJVYv30jM0iYRUBF4uFVP ZAwr4C7xMJ1DcwQE+Ukzh//CWZzCnhIfD3VzgZiCwHVvH4DY6tIrJ86iw2iV1Di5MwnLCA2s4 CExMEXL6DmcEvcPj2VeQIj3ywkZbOQlC1gZFrFqFGcWlSWWqRraKyXVJSZnlGSm5iZo2toYKa Xm1pcnJiempOYVKyXnJ+7iREYUAxAsIPxy7KAQ4ySHExKoryVrz+FC/El5adUZiQWZ8QXleak Fh9ilOHgUJLg3V75OVxIsCg1PbUiLTMHGNowaQkOHiUR3kcVQGne4oLE3OLMdIjUKUZdjg+Tr 69lEmLJy89LlRLn3QMyQwCkKKM0D24ELM4uMcpKCfMyAh0lxFOQWpSbWYIq/4pRnINRSZj3J8 gUnsy8ErhNr4COYAI6InDLB5AjShIRUlINjJvfrLo+4TTPm2VGWnNWt/e9N2d5fyROscxrjU9 F5dZ1WctYODNvbz5fZ34jyiwr7mTydsvVcRami8Ns9yUHLp/JbtiwZ8366y6pVpJxce92rHu/ b6LD+7wQ+7LyufYqzTYn/jLqR22cxmO9Z6LZVqOw4rdhig7/badJrH82+WHj4/43fk/V7iuxF GckGmoxFxUnAgDOGqRlrgIAAA== X-Env-Sender: prvs=0787cd24c=Paul.Durrant@citrix.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1475574542!52842213!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26721 invoked from network); 4 Oct 2016 09:49:03 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-8.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 4 Oct 2016 09:49:03 -0000 X-IronPort-AV: E=Sophos;i="5.31,442,1473120000"; d="scan'208";a="390530426" From: Paul Durrant To: , Date: Tue, 4 Oct 2016 10:29:13 +0100 Message-ID: <1475573358-32414-3-git-send-email-paul.durrant@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475573358-32414-1-git-send-email-paul.durrant@citrix.com> References: <1475573358-32414-1-git-send-email-paul.durrant@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Paul Durrant , Wei Liu Subject: [Xen-devel] [PATCH v2 net-next 2/7] xen-netback: retire guest rx side prefix GSO feature X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP As far as I am aware only very old Windows network frontends make use of this style of passing GSO packets from backend to frontend. These frontends can easily be replaced by the freely available Xen Project Windows PV network frontend, which uses the 'default' mechanism for passing GSO packets, which is also used by all Linux frontends. NOTE: Removal of this feature will not cause breakage in old Windows frontends. They simply will no longer receive GSO packets - the packets instead being fragmented in the backend. Signed-off-by: Paul Durrant Reviewed-by: David Vrabel --- Cc: Wei Liu --- drivers/net/xen-netback/common.h | 1 - drivers/net/xen-netback/interface.c | 4 ++-- drivers/net/xen-netback/rx.c | 26 -------------------------- drivers/net/xen-netback/xenbus.c | 21 --------------------- 4 files changed, 2 insertions(+), 50 deletions(-) diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index b38fb2c..0ba5910 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h @@ -260,7 +260,6 @@ struct xenvif { /* Frontend feature information. */ int gso_mask; - int gso_prefix_mask; u8 can_sg:1; u8 ip_csum:1; diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index fb50c6d..211d542 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -319,9 +319,9 @@ static netdev_features_t xenvif_fix_features(struct net_device *dev, if (!vif->can_sg) features &= ~NETIF_F_SG; - if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV4)) + if (~(vif->gso_mask) & GSO_BIT(TCPV4)) features &= ~NETIF_F_TSO; - if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV6)) + if (~(vif->gso_mask) & GSO_BIT(TCPV6)) features &= ~NETIF_F_TSO6; if (!vif->ip_csum) features &= ~NETIF_F_IP_CSUM; diff --git a/drivers/net/xen-netback/rx.c b/drivers/net/xen-netback/rx.c index 03836aa..6bd7d6e 100644 --- a/drivers/net/xen-netback/rx.c +++ b/drivers/net/xen-netback/rx.c @@ -347,16 +347,6 @@ static int xenvif_gop_skb(struct sk_buff *skb, gso_type = XEN_NETIF_GSO_TYPE_TCPV6; } - /* Set up a GSO prefix descriptor, if necessary */ - if ((1 << gso_type) & vif->gso_prefix_mask) { - RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req); - meta = npo->meta + npo->meta_prod++; - meta->gso_type = gso_type; - meta->gso_size = skb_shinfo(skb)->gso_size; - meta->size = 0; - meta->id = req.id; - } - RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req); meta = npo->meta + npo->meta_prod++; @@ -511,22 +501,6 @@ static void xenvif_rx_action(struct xenvif_queue *queue) while ((skb = __skb_dequeue(&rxq)) != NULL) { struct xen_netif_extra_info *extra = NULL; - if ((1 << queue->meta[npo.meta_cons].gso_type) & - vif->gso_prefix_mask) { - resp = RING_GET_RESPONSE(&queue->rx, - queue->rx.rsp_prod_pvt++); - - resp->flags = XEN_NETRXF_gso_prefix | - XEN_NETRXF_more_data; - - resp->offset = queue->meta[npo.meta_cons].gso_size; - resp->id = queue->meta[npo.meta_cons].id; - resp->status = XENVIF_RX_CB(skb)->meta_slots_used; - - npo.meta_cons++; - XENVIF_RX_CB(skb)->meta_slots_used--; - } - queue->stats.tx_bytes += skb->len; queue->stats.tx_packets++; diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index daf4c78..7056404 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -1135,7 +1135,6 @@ static int read_xenbus_vif_flags(struct backend_info *be) vif->can_sg = !!val; vif->gso_mask = 0; - vif->gso_prefix_mask = 0; if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4", "%d", &val) < 0) @@ -1143,32 +1142,12 @@ static int read_xenbus_vif_flags(struct backend_info *be) if (val) vif->gso_mask |= GSO_BIT(TCPV4); - if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4-prefix", - "%d", &val) < 0) - val = 0; - if (val) - vif->gso_prefix_mask |= GSO_BIT(TCPV4); - if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6", "%d", &val) < 0) val = 0; if (val) vif->gso_mask |= GSO_BIT(TCPV6); - if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6-prefix", - "%d", &val) < 0) - val = 0; - if (val) - vif->gso_prefix_mask |= GSO_BIT(TCPV6); - - if (vif->gso_mask & vif->gso_prefix_mask) { - xenbus_dev_fatal(dev, err, - "%s: gso and gso prefix flags are not " - "mutually exclusive", - dev->otherend); - return -EOPNOTSUPP; - } - if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload", "%d", &val) < 0) val = 0;