netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	utz.bacher@de.ibm.com
Subject: [PATCH net-next 10/13] qeth: add network device features for VLAN devices
Date: Thu, 16 Jun 2016 16:19:00 +0200	[thread overview]
Message-ID: <1466086743-55484-11-git-send-email-ubraun@linux.vnet.ibm.com> (raw)
In-Reply-To: <1466086743-55484-1-git-send-email-ubraun@linux.vnet.ibm.com>

From: Hans Wippel <hwippel@linux.vnet.ibm.com>

Network device features indicate the capabilities of network devices (e.g.,
TX checksum offloading and TSO) and their configuration state. Additional
network device features (vlan_features) indicate for each network device,
which capabilities can be used on VLAN devices, that are configured on the
respective base network device.

In the current qeth implementation, network device features are only set
for the base network devices and not for the VLAN devices. Thus, features
like TX checksum offloading cannot be used on VLAN devices.

This patch adds network device features to vlan_features, so they can be
used by VLAN devices.

Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
---
 drivers/s390/net/qeth_l2_main.c | 9 +++++++--
 drivers/s390/net/qeth_l3_main.c | 3 +++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 928a4ad..9fd48de 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1113,11 +1113,16 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
 	card->dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
 	if (card->info.type == QETH_CARD_TYPE_OSD && !card->info.guestlan) {
 		card->dev->hw_features = NETIF_F_SG;
+		card->dev->vlan_features = NETIF_F_SG;
 		/* OSA 3S and earlier has no RX/TX support */
-		if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM))
+		if (qeth_is_supported(card, IPA_OUTBOUND_CHECKSUM)) {
 			card->dev->hw_features |= NETIF_F_IP_CSUM;
-		if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM))
+			card->dev->vlan_features |= NETIF_F_IP_CSUM;
+		}
+		if (qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
 			card->dev->hw_features |= NETIF_F_RXCSUM;
+			card->dev->vlan_features |= NETIF_F_RXCSUM;
+		}
 		/* Turn on SG per default */
 		card->dev->features |= NETIF_F_SG;
 	}
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index fc81776..05f764c 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3106,6 +3106,9 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
 				card->dev->hw_features = NETIF_F_SG |
 					NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
 					NETIF_F_TSO;
+				card->dev->vlan_features = NETIF_F_SG |
+					NETIF_F_RXCSUM | NETIF_F_IP_CSUM |
+					NETIF_F_TSO;
 				card->dev->features = NETIF_F_SG;
 			}
 		}
-- 
2.6.6

  parent reply	other threads:[~2016-06-16 14:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 14:18 [PATCH net-next 00/13] s390: qeth patches Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 01/13] qeth: Include error message for "OS Mismatch" Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 02/13] qeth: refactor calculation of SBALE count Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 03/13] qeth: clean up condition when tso is used Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 04/13] qeth: fill netdevice->gso_* attributes accurately Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 05/13] qeth: enable scatter/gather in layer 2 mode Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 06/13] qeth: enable scatter/gather by default Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 07/13] qeth: introduce linearization fail count to stats Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 08/13] qeth: optimize IP handling in rx_mode callback Ursula Braun
2016-06-16 14:18 ` [PATCH net-next 09/13] qeth layer 2 and layer 3 common feature handling Ursula Braun
2016-06-16 14:19 ` Ursula Braun [this message]
2016-06-16 14:19 ` [PATCH net-next 11/13] qeth: improve set_features error handling Ursula Braun
2016-06-16 14:19 ` [PATCH net-next 12/13] qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets Ursula Braun
2016-06-16 14:19 ` [PATCH net-next 13/13] s390/qeth: fix indentation in qeth_l3_arp_query Ursula Braun
2016-06-17  5:16 ` [PATCH net-next 00/13] s390: qeth patches David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466086743-55484-11-git-send-email-ubraun@linux.vnet.ibm.com \
    --to=ubraun@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=utz.bacher@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).