From patchwork Mon Oct 3 07:31:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 9360157 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 D37AC608A6 for ; Mon, 3 Oct 2016 07:53:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D37142890E for ; Mon, 3 Oct 2016 07:53:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7FFA28963; Mon, 3 Oct 2016 07:53:29 +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 5B5112892D for ; Mon, 3 Oct 2016 07:53:29 +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 1bqy1b-0000cM-J6; Mon, 03 Oct 2016 07:50:59 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bqy1b-0000cA-0b for xen-devel@lists.xenproject.org; Mon, 03 Oct 2016 07:50:59 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id 04/4D-29579-2ED02F75; Mon, 03 Oct 2016 07:50:58 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRWlGSWpSXmKPExsXitHSDve4D3k/ hBiunmVp83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBk9uy+wFZxWqZh85Bh7A+NnuS5GDg4JAX+J Daszuhg5OdgEdCSmPr3ECmKLCNhJXNp8gB2khFnAU6LnljlIWFggSOL/wl0sIDaLgIrExic9b CA2r4C7xMaH28FsCQE5ifPHfzKD2JwCHhJLz08HGyMEVHNoLtgYIaDW9VNnQbUKSpyc+QRsJL OAhMTBFy+YIcZwS9w+PZV5AiPfLCRls5CULWBkWsWoUZxaVJZapGtkqpdUlJmeUZKbmJmja2h grJebWlycmJ6ak5hUrJecn7uJERhO9QwMjDsYW0/4HWKU5GBSEuX13/wxXIgvKT+lMiOxOCO+ qDQntfgQowwHh5IE7wOeT+FCgkWp6akVaZk5wMCGSUtw8CiJ8N4CSfMWFyTmFmemQ6ROMepyf Jh8fS2TEEtefl6qlDjvEpAiAZCijNI8uBGwKLvEKCslzMvIwMAgxFOQWpSbWYIq/4pRnINRSZ j3LcgUnsy8ErhNr4COYAI6InDLB5AjShIRUlINjALVEws8Y+98kfvYOulXiK4I/96NLjfUCuS mHdx9I7H0YJ7S+YY74lw6PV/jwqxSD1TusSv791Ck+ZrbpJ8ev159evX//IHL1StDuYReXjY+ Pr9gbYnlzKgqpiofZ37v3ck6nBvkN136v+CxlqNF5o72rgCV32f7WJxvBAeGPTXhufxnl3jQC iWW4oxEQy3mouJEAG774LStAgAA X-Env-Sender: prvs=0774b174f=Paul.Durrant@citrix.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1475481054!64055898!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 2073 invoked from network); 3 Oct 2016 07:50:56 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 3 Oct 2016 07:50:56 -0000 X-IronPort-AV: E=Sophos;i="5.31,289,1473120000"; d="scan'208";a="390285417" From: Paul Durrant To: , Date: Mon, 3 Oct 2016 08:31:07 +0100 Message-ID: <1475479872-23717-3-git-send-email-paul.durrant@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1475479872-23717-1-git-send-email-paul.durrant@citrix.com> References: <1475479872-23717-1-git-send-email-paul.durrant@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Paul Durrant , Wei Liu Subject: [Xen-devel] [PATCH 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 --- 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 3a56268..e16004a 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 83deeeb..1a009e7 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -328,9 +328,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 bacf6e0..6c57b02 100644 --- a/drivers/net/xen-netback/xenbus.c +++ b/drivers/net/xen-netback/xenbus.c @@ -1154,7 +1154,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) @@ -1162,32 +1161,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;