]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen-netback: retire guest rx side prefix GSO feature
authorPaul Durrant <Paul.Durrant@citrix.com>
Fri, 12 May 2017 08:46:29 +0000 (09:46 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Wed, 31 May 2017 21:51:36 +0000 (22:51 +0100)
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 <paul.durrant@citrix.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit fedbc8c132bcf836358103195d8b6df6c03d9daf)
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/net/xen-netback/common.h
drivers/net/xen-netback/interface.c
drivers/net/xen-netback/rx.c
drivers/net/xen-netback/xenbus.c

index f44b388464208d25b4d11613a2f8b16862256ec4..7dde29173a5eb4e8e7aa162cf8371f23d5e73f3a 100644 (file)
@@ -231,7 +231,6 @@ struct xenvif {
 
        /* Frontend feature information. */
        int gso_mask;
-       int gso_prefix_mask;
 
        u8 can_sg:1;
        u8 ip_csum:1;
index f5231a2dd2ac961089029c8acd40f97c3cb7991b..aae5bcccef9209385dcb74f775a15313abe8f2b6 100644 (file)
@@ -292,9 +292,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;
index d8d6f8874f3b9b60a0d781e2db7351a341ebf39e..569c54aab1b4bee8be822dfce94c3494f7ebed58 100644 (file)
@@ -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++;
 
index 961a3470084ba092b036e6053a38fc96f83a6aa0..7d6e78b60b08202d3ca4542e0f83e5d67e539249 100644 (file)
@@ -1060,28 +1060,13 @@ static int read_xenbus_vif_flags(struct backend_info *be)
        vif->can_sg = !!xenbus_read_unsigned(dev->otherend, "feature-sg", 0);
 
        vif->gso_mask = 0;
-       vif->gso_prefix_mask = 0;
 
        if (xenbus_read_unsigned(dev->otherend, "feature-gso-tcpv4", 0))
                vif->gso_mask |= GSO_BIT(TCPV4);
 
-       if (xenbus_read_unsigned(dev->otherend, "feature-gso-tcpv4-prefix", 0))
-               vif->gso_prefix_mask |= GSO_BIT(TCPV4);
-
        if (xenbus_read_unsigned(dev->otherend, "feature-gso-tcpv6", 0))
                vif->gso_mask |= GSO_BIT(TCPV6);
 
-       if (xenbus_read_unsigned(dev->otherend, "feature-gso-tcpv6-prefix", 0))
-               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;
-       }
-
        vif->ip_csum = !xenbus_read_unsigned(dev->otherend,
                                             "feature-no-csum-offload", 0);