[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431451117-70051-12-git-send-email-joao.martins@neclab.eu>
Date: Tue, 12 May 2015 19:18:35 +0200
From: Joao Martins <joao.martins@...lab.eu>
To: <xen-devel@...ts.xenproject.org>, <netdev@...r.kernel.org>
CC: <wei.liu2@...rix.com>, <ian.campbell@...rix.com>,
<david.vrabel@...rix.com>, <boris.ostrovsky@...cle.com>,
<konrad.wilk@...cle.com>, Joao Martins <joao.martins@...lab.eu>
Subject: [RFC PATCH 11/13] xen-netfront: feature-persistent xenbus support
"feature-persistent" check on xenbus for persistent grants
support on the backend.
Signed-off-by: Joao Martins <joao.martins@...lab.eu>
---
drivers/net/xen-netfront.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 99c17c9..7f44cc7 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -162,6 +162,8 @@ struct netfront_info {
struct netfront_stats __percpu *tx_stats;
atomic_t rx_gso_checksum_fixup;
+
+ unsigned int feature_persistent:1;
};
struct netfront_rx_info {
@@ -1919,6 +1921,12 @@ again:
goto abort_transaction;
}
+ err = xenbus_write(xbt, dev->nodename, "feature-persistent", "1");
+ if (err) {
+ message = "writing feature-persistent";
+ goto abort_transaction;
+ }
+
err = xenbus_transaction_end(xbt, 0);
if (err) {
if (err == -EAGAIN)
@@ -1950,6 +1958,7 @@ static int xennet_connect(struct net_device *dev)
unsigned int num_queues = 0;
int err;
unsigned int feature_rx_copy;
+ unsigned int feature_persistent;
unsigned int j = 0;
struct netfront_queue *queue = NULL;
@@ -1964,6 +1973,13 @@ static int xennet_connect(struct net_device *dev)
return -ENODEV;
}
+ err = xenbus_gather(XBT_NIL, np->xbdev->otherend,
+ "feature-persistent", "%u", &feature_persistent,
+ NULL);
+ if (err)
+ feature_persistent = 0;
+ np->feature_persistent = !!feature_persistent;
+
err = talk_to_netback(np->xbdev, np);
if (err)
return err;
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists