From: Julian Wiedmann <jwi@linux.ibm.com>
Subject: s390/qeth: drop CONFIG_QETH_IPV6
Patch-mainline: v4.16-rc1
Git-commit: c062204f8d3dceb81f726e4d45f4ae195be44fd9
References: FATE#326350, LTC#169511, bsc#1113509
Summary: qeth: performance improvements
Description: This adds recent functional and performance improvements for the
qeth network driver.
Primarily this brings Scatter-Gather support for HiperSockets,
reduced CPU consumption in the L3 IPv4 transmit path for OSA,
improved Promiscuous Mode performance due to IFF_UNICAST_FLT,
support for Scatter-Gather on z/VM virtual NICs, and
support for delayed GRO flushing.
For sanity & stability reasons, this effectively constitutes a
backport of the qeth device driver from 4.19 mainline.
Upstream-Description:
s390/qeth: drop CONFIG_QETH_IPV6
commit "s390/qeth: use ip*_eth_mc_map helpers" removed the last
occurrence of CONFIG_IPV6-dependent code.
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/s390/net/Kconfig | 3 --
drivers/s390/net/qeth_l3_main.c | 60 ++++++----------------------------------
2 files changed, 9 insertions(+), 54 deletions(-)
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -90,9 +90,6 @@ config QETH_L3
To compile as a module choose M. The module name is qeth_l3.
If unsure, choose Y.
-config QETH_IPV6
- def_bool y if (QETH_L3 = IPV6) || (QETH_L3 && IPV6 = 'y')
-
config CCWGROUP
tristate
default (LCS || CTCM || QETH)
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -573,7 +573,6 @@ int qeth_l3_setrouting_v6(struct qeth_ca
int rc = 0;
QETH_CARD_TEXT(card, 3, "setrtg6");
-#ifdef CONFIG_QETH_IPV6
if (!qeth_is_supported(card, IPA_IPV6))
return 0;
@@ -590,7 +589,6 @@ int qeth_l3_setrouting_v6(struct qeth_ca
" on %s. Type set to 'no router'.\n", rc,
QETH_CARD_IFNAME(card));
}
-#endif
return rc;
}
@@ -922,7 +920,6 @@ static int qeth_l3_setadapter_parms(stru
return rc;
}
-#ifdef CONFIG_QETH_IPV6
static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
enum qeth_ipa_funcs ipa_func, __u16 cmd_code)
{
@@ -938,7 +935,6 @@ static int qeth_l3_send_simple_setasspar
qeth_setassparms_cb, NULL);
return rc;
}
-#endif
static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card)
{
@@ -1034,7 +1030,6 @@ static int qeth_l3_start_ipa_multicast(s
return rc;
}
-#ifdef CONFIG_QETH_IPV6
static int qeth_l3_softsetup_ipv6(struct qeth_card *card)
{
int rc;
@@ -1080,12 +1075,9 @@ out:
dev_info(&card->gdev->dev, "IPV6 enabled\n");
return 0;
}
-#endif
static int qeth_l3_start_ipa_ipv6(struct qeth_card *card)
{
- int rc = 0;
-
QETH_CARD_TEXT(card, 3, "strtipv6");
if (!qeth_is_supported(card, IPA_IPV6)) {
@@ -1093,10 +1085,7 @@ static int qeth_l3_start_ipa_ipv6(struct
"IPv6 not supported on %s\n", QETH_CARD_IFNAME(card));
return 0;
}
-#ifdef CONFIG_QETH_IPV6
- rc = qeth_l3_softsetup_ipv6(card);
-#endif
- return rc ;
+ return qeth_l3_softsetup_ipv6(card);
}
static int qeth_l3_start_ipa_broadcast(struct qeth_card *card)
@@ -1447,9 +1436,8 @@ unlock:
rcu_read_unlock();
}
-#ifdef CONFIG_QETH_IPV6
-static void
-qeth_l3_add_mc6_to_hash(struct qeth_card *card, struct inet6_dev *in6_dev)
+static void qeth_l3_add_mc6_to_hash(struct qeth_card *card,
+ struct inet6_dev *in6_dev)
{
struct qeth_ipaddr *ipm;
struct ifmcaddr6 *im6;
@@ -1539,7 +1527,6 @@ static void qeth_l3_add_multicast_ipv6(s
rcu_read_unlock();
in6_dev_put(in6_dev);
}
-#endif /* CONFIG_QETH_IPV6 */
static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,
unsigned short vid)
@@ -1579,9 +1566,8 @@ out:
}
static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,
- unsigned short vid)
+ unsigned short vid)
{
-#ifdef CONFIG_QETH_IPV6
struct inet6_dev *in6_dev;
struct inet6_ifaddr *ifa;
struct qeth_ipaddr *addr;
@@ -1616,7 +1602,6 @@ static void qeth_l3_free_vlan_addresses6
kfree(addr);
out:
in6_dev_put(in6_dev);
-#endif /* CONFIG_QETH_IPV6 */
}
static void qeth_l3_free_vlan_addresses(struct qeth_card *card,
@@ -1667,19 +1652,11 @@ static void qeth_l3_rebuild_skb(struct q
skb_reset_network_header(skb);
switch (hdr->hdr.l3.flags & QETH_HDR_CAST_MASK) {
case QETH_CAST_MULTICAST:
- switch (prot) {
-#ifdef CONFIG_QETH_IPV6
- case ETH_P_IPV6:
- ipv6_eth_mc_map(&ipv6_hdr(skb)->daddr, tg_addr);
- break;
-#endif
- case ETH_P_IP:
+ if (prot == ETH_P_IP)
ip_eth_mc_map(ip_hdr(skb)->daddr, tg_addr);
- break;
- default:
- memcpy(tg_addr, card->dev->broadcast,
- card->dev->addr_len);
- }
+ else
+ ipv6_eth_mc_map(&ipv6_hdr(skb)->daddr, tg_addr);
+
card->stats.multicast++;
skb->pkt_type = PACKET_MULTICAST;
break;
@@ -1940,9 +1917,7 @@ static void qeth_l3_set_multicast_list(s
qeth_l3_mark_all_mc_to_be_deleted(card);
qeth_l3_add_multicast_ipv4(card);
-#ifdef CONFIG_QETH_IPV6
qeth_l3_add_multicast_ipv6(card);
-#endif
qeth_l3_delete_nonused_mc(card);
qeth_l3_add_all_new_mc(card);
@@ -2213,12 +2188,10 @@ static int qeth_l3_arp_query(struct qeth
rc = -EFAULT;
goto free_and_out;
}
-#ifdef CONFIG_QETH_IPV6
if (qinfo.mask_bits & QETH_QARP_WITH_IPV6) {
/* fails in case of GuestLAN QDIO mode */
qeth_l3_query_arp_cache_info(card, QETH_PROT_IPV6, &qinfo);
}
-#endif
if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) {
QETH_CARD_TEXT(card, 4, "qactf");
rc = -EFAULT;
@@ -3349,10 +3322,6 @@ static struct notifier_block qeth_l3_ip_
NULL,
};
-#ifdef CONFIG_QETH_IPV6
-/**
- * IPv6 event handler
- */
static int qeth_l3_ip6_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
@@ -3397,7 +3366,6 @@ static struct notifier_block qeth_l3_ip6
qeth_l3_ip6_event,
NULL,
};
-#endif
static int qeth_l3_register_notifiers(void)
{
@@ -3407,35 +3375,25 @@ static int qeth_l3_register_notifiers(vo
rc = register_inetaddr_notifier(&qeth_l3_ip_notifier);
if (rc)
return rc;
-#ifdef CONFIG_QETH_IPV6
rc = register_inet6addr_notifier(&qeth_l3_ip6_notifier);
if (rc) {
unregister_inetaddr_notifier(&qeth_l3_ip_notifier);
return rc;
}
-#else
- pr_warn("There is no IPv6 support for the layer 3 discipline\n");
-#endif
return 0;
}
static void qeth_l3_unregister_notifiers(void)
{
-
QETH_DBF_TEXT(SETUP, 5, "unregnot");
WARN_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier));
-#ifdef CONFIG_QETH_IPV6
WARN_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier));
-#endif /* QETH_IPV6 */
}
static int __init qeth_l3_init(void)
{
- int rc = 0;
-
pr_info("register layer 3 discipline\n");
- rc = qeth_l3_register_notifiers();
- return rc;
+ return qeth_l3_register_notifiers();
}
static void __exit qeth_l3_exit(void)