aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Durrant <Paul.Durrant@citrix.com>2016-10-04 05:29:13 -0400
committerDavid S. Miller <davem@davemloft.net>2016-10-06 20:37:35 -0400
commitfedbc8c132bcf836358103195d8b6df6c03d9daf (patch)
treec1ec65b5672d0dda794abd74c2f0ac5ded628ad4
parent3254f83694fe519ac18b8334a2f481d80c3a8a3a (diff)
xen-netback: retire guest rx side prefix GSO feature
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>
-rw-r--r--drivers/net/xen-netback/common.h1
-rw-r--r--drivers/net/xen-netback/interface.c4
-rw-r--r--drivers/net/xen-netback/rx.c26
-rw-r--r--drivers/net/xen-netback/xenbus.c21
4 files changed, 2 insertions, 50 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h
index b38fb2cf3364..0ba59106b1a5 100644
--- a/drivers/net/xen-netback/common.h
+++ b/drivers/net/xen-netback/common.h
@@ -260,7 +260,6 @@ struct xenvif {
260 260
261 /* Frontend feature information. */ 261 /* Frontend feature information. */
262 int gso_mask; 262 int gso_mask;
263 int gso_prefix_mask;
264 263
265 u8 can_sg:1; 264 u8 can_sg:1;
266 u8 ip_csum:1; 265 u8 ip_csum:1;
diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
index fb50c6d5f6c3..211d542a830b 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,
319 319
320 if (!vif->can_sg) 320 if (!vif->can_sg)
321 features &= ~NETIF_F_SG; 321 features &= ~NETIF_F_SG;
322 if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV4)) 322 if (~(vif->gso_mask) & GSO_BIT(TCPV4))
323 features &= ~NETIF_F_TSO; 323 features &= ~NETIF_F_TSO;
324 if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV6)) 324 if (~(vif->gso_mask) & GSO_BIT(TCPV6))
325 features &= ~NETIF_F_TSO6; 325 features &= ~NETIF_F_TSO6;
326 if (!vif->ip_csum) 326 if (!vif->ip_csum)
327 features &= ~NETIF_F_IP_CSUM; 327 features &= ~NETIF_F_IP_CSUM;
diff --git a/drivers/net/xen-netback/rx.c b/drivers/net/xen-netback/rx.c
index 03836aaac1c2..6bd7d6e84b8e 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,
347 gso_type = XEN_NETIF_GSO_TYPE_TCPV6; 347 gso_type = XEN_NETIF_GSO_TYPE_TCPV6;
348 } 348 }
349 349
350 /* Set up a GSO prefix descriptor, if necessary */
351 if ((1 << gso_type) & vif->gso_prefix_mask) {
352 RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req);
353 meta = npo->meta + npo->meta_prod++;
354 meta->gso_type = gso_type;
355 meta->gso_size = skb_shinfo(skb)->gso_size;
356 meta->size = 0;
357 meta->id = req.id;
358 }
359
360 RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req); 350 RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req);
361 meta = npo->meta + npo->meta_prod++; 351 meta = npo->meta + npo->meta_prod++;
362 352
@@ -511,22 +501,6 @@ static void xenvif_rx_action(struct xenvif_queue *queue)
511 while ((skb = __skb_dequeue(&rxq)) != NULL) { 501 while ((skb = __skb_dequeue(&rxq)) != NULL) {
512 struct xen_netif_extra_info *extra = NULL; 502 struct xen_netif_extra_info *extra = NULL;
513 503
514 if ((1 << queue->meta[npo.meta_cons].gso_type) &
515 vif->gso_prefix_mask) {
516 resp = RING_GET_RESPONSE(&queue->rx,
517 queue->rx.rsp_prod_pvt++);
518
519 resp->flags = XEN_NETRXF_gso_prefix |
520 XEN_NETRXF_more_data;
521
522 resp->offset = queue->meta[npo.meta_cons].gso_size;
523 resp->id = queue->meta[npo.meta_cons].id;
524 resp->status = XENVIF_RX_CB(skb)->meta_slots_used;
525
526 npo.meta_cons++;
527 XENVIF_RX_CB(skb)->meta_slots_used--;
528 }
529
530 queue->stats.tx_bytes += skb->len; 504 queue->stats.tx_bytes += skb->len;
531 queue->stats.tx_packets++; 505 queue->stats.tx_packets++;
532 506
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index daf4c7867102..7056404e3cb8 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)
1135 vif->can_sg = !!val; 1135 vif->can_sg = !!val;
1136 1136
1137 vif->gso_mask = 0; 1137 vif->gso_mask = 0;
1138 vif->gso_prefix_mask = 0;
1139 1138
1140 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4", 1139 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4",
1141 "%d", &val) < 0) 1140 "%d", &val) < 0)
@@ -1143,32 +1142,12 @@ static int read_xenbus_vif_flags(struct backend_info *be)
1143 if (val) 1142 if (val)
1144 vif->gso_mask |= GSO_BIT(TCPV4); 1143 vif->gso_mask |= GSO_BIT(TCPV4);
1145 1144
1146 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4-prefix",
1147 "%d", &val) < 0)
1148 val = 0;
1149 if (val)
1150 vif->gso_prefix_mask |= GSO_BIT(TCPV4);
1151
1152 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6", 1145 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6",
1153 "%d", &val) < 0) 1146 "%d", &val) < 0)
1154 val = 0; 1147 val = 0;
1155 if (val) 1148 if (val)
1156 vif->gso_mask |= GSO_BIT(TCPV6); 1149 vif->gso_mask |= GSO_BIT(TCPV6);
1157 1150
1158 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6-prefix",
1159 "%d", &val) < 0)
1160 val = 0;
1161 if (val)
1162 vif->gso_prefix_mask |= GSO_BIT(TCPV6);
1163
1164 if (vif->gso_mask & vif->gso_prefix_mask) {
1165 xenbus_dev_fatal(dev, err,
1166 "%s: gso and gso prefix flags are not "
1167 "mutually exclusive",
1168 dev->otherend);
1169 return -EOPNOTSUPP;
1170 }
1171
1172 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload", 1151 if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
1173 "%d", &val) < 0) 1152 "%d", &val) < 0)
1174 val = 0; 1153 val = 0;