Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580024 > unrolled thread

[PATCH v4 net-next 0/8] sunvnet driver updates

Started byShannon Nelson <shannon.nelson@oracle.com>
First post2017-02-13 20:10 +0100
Last post2017-02-14 19:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 net-next 0/8] sunvnet driver updates Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-13 20:10 +0100
    [PATCH v4 net-next 4/8] sunvnet: add memory barrier before check for tx enable Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-13 20:10 +0100
    [PATCH v4 net-next 2/8] sunvnet: remove unused variable in maybe_tx_wakeup Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-13 20:10 +0100
    Re: [PATCH v4 net-next 0/8] sunvnet driver updates David Miller <davem@davemloft.net> - 2017-02-14 19:10 +0100

#1580024 — [PATCH v4 net-next 0/8] sunvnet driver updates

FromShannon Nelson <shannon.nelson@oracle.com>
Date2017-02-13 20:10 +0100
Subject[PATCH v4 net-next 0/8] sunvnet driver updates
Message-ID<tauaC-7Oj-19@gated-at.bofh.it>
The sunvnet ldom virtual network driver was due for some updates and
a bugfix or two.  These patches address a few items left over from
last year's make-over.

v2:
 - changed memory barrier fix to use smp_wmb
 - put NETIF_F_SG back into the advertised ldmvsw hw_features

v3:
 - the sunvnet_common module doesn't need module_init or _exit

v4:
 - dropped the statistics patch
 - fixed up "default" tag for SUNVNET_COMMON

Shannon Nelson (7):
  sunvnet: make sunvnet common code dynamically loadable
  sunvnet: update version and version printing
  sunvnet: add memory barrier before check for tx enable
  sunvnet: straighten up message event handling logic
  sunvnet: remove extra rcu_read_unlocks
  ldmvsw: update and simplify version string
  ldmvsw: disable tso and gso for bridge operations

Sowmini Varadhan (1):
  sunvnet: remove unused variable in maybe_tx_wakeup

 drivers/net/ethernet/sun/Kconfig          |    8 ++-
 drivers/net/ethernet/sun/ldmvsw.c         |   19 ++---
 drivers/net/ethernet/sun/sunvnet.c        |   14 +---
 drivers/net/ethernet/sun/sunvnet_common.c |  117 ++++++++++++++---------------
 4 files changed, 72 insertions(+), 86 deletions(-)

[toc] | [next] | [standalone]


#1580025 — [PATCH v4 net-next 4/8] sunvnet: add memory barrier before check for tx enable

FromShannon Nelson <shannon.nelson@oracle.com>
Date2017-02-13 20:10 +0100
Subject[PATCH v4 net-next 4/8] sunvnet: add memory barrier before check for tx enable
Message-ID<tauaD-7Oj-47@gated-at.bofh.it>
In reply to#1580024
In order to allow the underlying LDC and outstanding memory operations
to potentially catch up with the driver's Tx requests, add a memory
barrier before checking again for available tx descriptors.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/sun/sunvnet_common.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
index 0f940f0..623363b 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.c
+++ b/drivers/net/ethernet/sun/sunvnet_common.c
@@ -1427,6 +1427,7 @@ int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
 	dr->prod = (dr->prod + 1) & (VNET_TX_RING_SIZE - 1);
 	if (unlikely(vnet_tx_dring_avail(dr) < 1)) {
 		netif_tx_stop_queue(txq);
+		smp_rmb();
 		if (vnet_tx_dring_avail(dr) > VNET_TX_WAKEUP_THRESH(dr))
 			netif_tx_wake_queue(txq);
 	}
-- 
1.7.1

[toc] | [prev] | [next] | [standalone]


#1580026 — [PATCH v4 net-next 2/8] sunvnet: remove unused variable in maybe_tx_wakeup

FromShannon Nelson <shannon.nelson@oracle.com>
Date2017-02-13 20:10 +0100
Subject[PATCH v4 net-next 2/8] sunvnet: remove unused variable in maybe_tx_wakeup
Message-ID<tauaD-7Oj-51@gated-at.bofh.it>
In reply to#1580024
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>

The vio_dring_state *dr variable is unused in maybe_tx_wakeup().
As the comments indicate, we call maybe_tx_wakeup() whenever we
get a STOPPED LDC message on the port. If the queue is stopped,
we want to wake it up so that we will send another START message
at the next TX and trigger the consumer to drain the dring.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
 drivers/net/ethernet/sun/sunvnet_common.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
index c71f000..0f940f0 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.c
+++ b/drivers/net/ethernet/sun/sunvnet_common.c
@@ -719,12 +719,8 @@ static void maybe_tx_wakeup(struct vnet_port *port)
 	txq = netdev_get_tx_queue(VNET_PORT_TO_NET_DEVICE(port),
 				  port->q_index);
 	__netif_tx_lock(txq, smp_processor_id());
-	if (likely(netif_tx_queue_stopped(txq))) {
-		struct vio_dring_state *dr;
-
-		dr = &port->vio.drings[VIO_DRIVER_TX_RING];
+	if (likely(netif_tx_queue_stopped(txq)))
 		netif_tx_wake_queue(txq);
-	}
 	__netif_tx_unlock(txq);
 }
 
-- 
1.7.1

[toc] | [prev] | [next] | [standalone]


#1580729

FromDavid Miller <davem@davemloft.net>
Date2017-02-14 19:10 +0100
Message-ID<taPI6-5ax-37@gated-at.bofh.it>
In reply to#1580024
From: Shannon Nelson <shannon.nelson@oracle.com>
Date: Mon, 13 Feb 2017 10:56:56 -0800

> The sunvnet ldom virtual network driver was due for some updates and
> a bugfix or two.  These patches address a few items left over from
> last year's make-over.
> 
> v2:
>  - changed memory barrier fix to use smp_wmb
>  - put NETIF_F_SG back into the advertised ldmvsw hw_features
> 
> v3:
>  - the sunvnet_common module doesn't need module_init or _exit
> 
> v4:
>  - dropped the statistics patch
>  - fixed up "default" tag for SUNVNET_COMMON

Series applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web