Displaying 20 results from an estimated 98 matches for "net_dev".
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
...ls/kvm/virtio/net.c
@@ -27,9 +27,8 @@
#include <sys/wait.h>
#define VIRTIO_NET_QUEUE_SIZE 128
-#define VIRTIO_NET_NUM_QUEUES 2
-#define VIRTIO_NET_RX_QUEUE 0
-#define VIRTIO_NET_TX_QUEUE 1
+#define VIRTIO_NET_NUM_QUEUES 16
+#define VIRTIO_NET_IS_RX_QUEUE(x) (((x) % 2) == 0)
struct net_dev;
@@ -49,14 +48,13 @@ struct net_dev {
struct virtio_net_config config;
u32 features;
- pthread_t io_rx_thread;
- pthread_mutex_t io_rx_lock;
- pthread_cond_t io_rx_cond;
-
- pthread_t io_tx_thread;
- pthread_mutex_t io_tx_lock;
- pthread_cond_t io_tx_cond;
+ pthread_t io_th...
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
...ls/kvm/virtio/net.c
@@ -27,9 +27,8 @@
#include <sys/wait.h>
#define VIRTIO_NET_QUEUE_SIZE 128
-#define VIRTIO_NET_NUM_QUEUES 2
-#define VIRTIO_NET_RX_QUEUE 0
-#define VIRTIO_NET_TX_QUEUE 1
+#define VIRTIO_NET_NUM_QUEUES 16
+#define VIRTIO_NET_IS_RX_QUEUE(x) (((x) % 2) == 0)
struct net_dev;
@@ -49,14 +48,13 @@ struct net_dev {
struct virtio_net_config config;
u32 features;
- pthread_t io_rx_thread;
- pthread_mutex_t io_rx_lock;
- pthread_cond_t io_rx_cond;
-
- pthread_t io_tx_thread;
- pthread_mutex_t io_tx_lock;
- pthread_cond_t io_tx_cond;
+ pthread_t io_th...
2012 Nov 28
4
[minios] Add xenbus shutdown control support
...erridden) app_main() */
app_main(&start_info);
diff -r fdf241ea6ff4 extras/mini-os/test.c
--- a/extras/mini-os/test.c Wed Nov 28 21:29:18 2012 +0100
+++ b/extras/mini-os/test.c Wed Nov 28 22:53:42 2012 +0100
@@ -46,6 +46,7 @@
#include <xen/version.h>
static struct netfront_dev *net_dev;
+static struct semaphore net_sem = __SEMAPHORE_INITIALIZER(net_sem, 0);
void test_xenbus(void);
@@ -70,12 +71,14 @@
static void netfront_thread(void *p)
{
net_dev = init_netfront(NULL, NULL, NULL, NULL);
+ up(&net_sem);
}
static struct blkfront_dev *blk_dev;
static struct b...
2011 Sep 01
10
[PATCH 00/10] netvsc bug fixes and cleanups
Fixed a set of bugs in netvsc module, and cleaned up some coding style issues.
Haiyang Zhang (10):
staging: hv: remove unnecessary includes in netvsc
staging: hv: add newline to log messages in netvsc
staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
staging: hv: re-order the code in
2011 Sep 01
10
[PATCH 00/10] netvsc bug fixes and cleanups
Fixed a set of bugs in netvsc module, and cleaned up some coding style issues.
Haiyang Zhang (10):
staging: hv: remove unnecessary includes in netvsc
staging: hv: add newline to log messages in netvsc
staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
staging: hv: re-order the code in
2011 Jul 21
11
[PATCH 0/9] netvsc bug fixes and cleanups
Fixed a set of bugs in netvsc module, and cleaned up some coding style issues.
Haiyang Zhang (9):
staging: hv: remove unnecessary includes in netvsc
staging: hv: add newline to log messages in netvsc
staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
staging: hv: re-order the code in
2011 Jul 21
11
[PATCH 0/9] netvsc bug fixes and cleanups
Fixed a set of bugs in netvsc module, and cleaned up some coding style issues.
Haiyang Zhang (9):
staging: hv: remove unnecessary includes in netvsc
staging: hv: add newline to log messages in netvsc
staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
staging: hv: re-order the code in
2011 Jun 17
7
[PATCH 1/5] staging: hv: fix some white spaces in netvsc driver
...STED);
}
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index b339acc..8380fe9 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -122,7 +122,7 @@ static void netvsc_xmit_completion(void *context)
atomic_add(num_pages, &net_device_ctx->avail);
if (atomic_read(&net_device_ctx->avail) >=
PACKET_PAGES_HIWATER)
- netif_wake_queue(net);
+ netif_wake_queue(net);
}
}
--
1.6.3.2
2011 Jun 17
7
[PATCH 1/5] staging: hv: fix some white spaces in netvsc driver
...STED);
}
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index b339acc..8380fe9 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -122,7 +122,7 @@ static void netvsc_xmit_completion(void *context)
atomic_add(num_pages, &net_device_ctx->avail);
if (atomic_read(&net_device_ctx->avail) >=
PACKET_PAGES_HIWATER)
- netif_wake_queue(net);
+ netif_wake_queue(net);
}
}
--
1.6.3.2
2011 Sep 08
25
[PATCH 0000/0025] Staging: hv: Driver cleanup
Address Greg's VmBus audit comments:
1) Leverage driver_data field in struct hv_vmbus_device_id to
simplify driver code.
2) Make the util driver conform to the Linux Driver Model.
3) Get rid of the ext field in struct hv_device by using the
driver specific data functionality.
4) Other general cleanup.
Regards,
K. Y
2011 Sep 08
25
[PATCH 0000/0025] Staging: hv: Driver cleanup
Address Greg's VmBus audit comments:
1) Leverage driver_data field in struct hv_vmbus_device_id to
simplify driver code.
2) Make the util driver conform to the Linux Driver Model.
3) Get rid of the ext field in struct hv_device by using the
driver specific data functionality.
4) Other general cleanup.
Regards,
K. Y
2008 Jun 19
0
[patch 05/15] virtio_net: Fix skb->csum_start computation
...lt;rusty at rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
drivers/net/virtio_net.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -83,9 +83,7 @@ static void receive_skb(struct net_devic
BUG_ON(len > MAX_PACKET_LEN);
skb_trim(skb, len);
- skb->protocol = eth_type_trans(skb, dev);
- pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
- ntohs(skb->protocol), skb->len, skb->pkt_type);
+
dev->stats.rx_bytes += skb->len;
dev->stats.rx_...
2014 May 08
2
[PATCH] net: get rid of SET_ETHTOOL_OPS
...ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index c4b3940..078cadd 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -105,5 +105,5 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
void ipoib_set_ethtool_ops(struct net_device *dev)
{
- SET_ETHTOOL_OPS(dev, &ipoib_ethtool_ops);
+ dev->ethtool_ops = &ipoib_ethtool_ops;
}
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 35df0b9..a968654 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c5...
2014 May 08
2
[PATCH] net: get rid of SET_ETHTOOL_OPS
...ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index c4b3940..078cadd 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -105,5 +105,5 @@ static const struct ethtool_ops ipoib_ethtool_ops = {
void ipoib_set_ethtool_ops(struct net_device *dev)
{
- SET_ETHTOOL_OPS(dev, &ipoib_ethtool_ops);
+ dev->ethtool_ops = &ipoib_ethtool_ops;
}
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 35df0b9..a968654 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c5...
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
netif_carrier_off() was called earlier in this function, and there is
no other thread access this device yet. The status checking code is not
necessary here.
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at
2011 May 23
5
[PATCH 1/6] staging: hv: remove unnecessary code in netvsc_probe().
netif_carrier_off() was called earlier in this function, and there is
no other thread access this device yet. The status checking code is not
necessary here.
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
net: get rid of SET_ETHTOOL_OPS
Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
This does that.
Mostly done via coccinelle script:
@@
struct ethtool_ops *ops;
struct net_device *dev;
@@
- SET_ETHTOOL_OPS(dev, ops);
+ dev->ethtool_ops = ops;
Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller <davem at davemloft.net>
Signed-off-by: Wilfried Klaebe <w-lkml at lebenslange-mailadresse.de>
---
Ap...
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
net: get rid of SET_ETHTOOL_OPS
Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
This does that.
Mostly done via coccinelle script:
@@
struct ethtool_ops *ops;
struct net_device *dev;
@@
- SET_ETHTOOL_OPS(dev, ops);
+ dev->ethtool_ops = ops;
Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller <davem at davemloft.net>
Signed-off-by: Wilfried Klaebe <w-lkml at lebenslange-mailadresse.de>
---
Ap...
2014 May 11
7
[PATCH] [resend] net: get rid of SET_ETHTOOL_OPS
net: get rid of SET_ETHTOOL_OPS
Dave Miller mentioned he'd like to see SET_ETHTOOL_OPS gone.
This does that.
Mostly done via coccinelle script:
@@
struct ethtool_ops *ops;
struct net_device *dev;
@@
- SET_ETHTOOL_OPS(dev, ops);
+ dev->ethtool_ops = ops;
Compile tested only, but I'd seriously wonder if this broke anything.
Suggested-by: Dave Miller <davem at davemloft.net>
Signed-off-by: Wilfried Klaebe <w-lkml at lebenslange-mailadresse.de>
---
Ap...
2007 Dec 11
1
[PATCH resent] virtio_net: Fix stalled inbound traffic on early packets
...o_net.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: kvm/drivers/net/virtio_net.c
===================================================================
--- kvm.orig/drivers/net/virtio_net.c
+++ kvm/drivers/net/virtio_net.c
@@ -285,13 +285,15 @@ static int virtnet_open(struct net_devic
{
struct virtnet_info *vi = netdev_priv(dev);
+ napi_enable(&vi->napi);
try_fill_recv(vi);
/* If we didn't even get one input buffer, we're useless. */
- if (vi->num == 0)
+ if (vi->num == 0) {
+ napi_disable(&vi->napi);
return -ENOMEM;
+ }
- napi_enab...