Skip to content

Commit fedbc8c

Browse files
Paul Durrantdavem330
authored andcommitted
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 <[email protected]> Reviewed-by: David Vrabel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3254f83 commit fedbc8c

File tree

4 files changed

+2
-50
lines changed

4 files changed

+2
-50
lines changed

drivers/net/xen-netback/common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ struct xenvif {
260260

261261
/* Frontend feature information. */
262262
int gso_mask;
263-
int gso_prefix_mask;
264263

265264
u8 can_sg:1;
266265
u8 ip_csum:1;

drivers/net/xen-netback/interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ static netdev_features_t xenvif_fix_features(struct net_device *dev,
319319

320320
if (!vif->can_sg)
321321
features &= ~NETIF_F_SG;
322-
if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV4))
322+
if (~(vif->gso_mask) & GSO_BIT(TCPV4))
323323
features &= ~NETIF_F_TSO;
324-
if (~(vif->gso_mask | vif->gso_prefix_mask) & GSO_BIT(TCPV6))
324+
if (~(vif->gso_mask) & GSO_BIT(TCPV6))
325325
features &= ~NETIF_F_TSO6;
326326
if (!vif->ip_csum)
327327
features &= ~NETIF_F_IP_CSUM;

drivers/net/xen-netback/rx.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,6 @@ static int xenvif_gop_skb(struct sk_buff *skb,
347347
gso_type = XEN_NETIF_GSO_TYPE_TCPV6;
348348
}
349349

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-
360350
RING_COPY_REQUEST(&queue->rx, queue->rx.req_cons++, &req);
361351
meta = npo->meta + npo->meta_prod++;
362352

@@ -511,22 +501,6 @@ static void xenvif_rx_action(struct xenvif_queue *queue)
511501
while ((skb = __skb_dequeue(&rxq)) != NULL) {
512502
struct xen_netif_extra_info *extra = NULL;
513503

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-
530504
queue->stats.tx_bytes += skb->len;
531505
queue->stats.tx_packets++;
532506

drivers/net/xen-netback/xenbus.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,40 +1135,19 @@ static int read_xenbus_vif_flags(struct backend_info *be)
11351135
vif->can_sg = !!val;
11361136

11371137
vif->gso_mask = 0;
1138-
vif->gso_prefix_mask = 0;
11391138

11401139
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv4",
11411140
"%d", &val) < 0)
11421141
val = 0;
11431142
if (val)
11441143
vif->gso_mask |= GSO_BIT(TCPV4);
11451144

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-
11521145
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-gso-tcpv6",
11531146
"%d", &val) < 0)
11541147
val = 0;
11551148
if (val)
11561149
vif->gso_mask |= GSO_BIT(TCPV6);
11571150

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-
11721151
if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-no-csum-offload",
11731152
"%d", &val) < 0)
11741153
val = 0;

0 commit comments

Comments
 (0)