s390: qeth network driver.
Subsystems (3)
PATCH 7/8 s390: qeth network driver.
[patch 7/8] s390: qeth network driver.
From: Steffen Thoss <[email protected]>
From: Frank Pavlic <[email protected]>
qeth network driver changes:
- Improve performance by omitting svs.
- Use function callback mechanism to set layer 2 parameters when getting a reply for a Layer 2 command.
- dev->hard_header must not be NULL when fake_ll is no set since IPv6 and Layer2 needs the default function set by network stack.
- ping6 works now when running in layer 2 mode.
- Save original dev->hard_header to restore it when the user doesn't want to use fake_ll anymore.
- Fake ethernet header in outgoing packets. This currently works only if qeth is compiled without ipv6 support.
- Add more debug information in case of failures in qeth_set_offline.
- Using fake_ll with HiperSockets devices results in misaligned ip packets and thus no traffic over HiperSockets.
- Start qeth_remove_device only after the qeth recovery completed.
diffstat:
drivers/s390/net/qeth.h | 19 +- drivers/s390/net/qeth_main.c | 351 ++++++++++++++++++++++++++++--------------- drivers/s390/net/qeth_sys.c | 16 - 3 files changed, 252 insertions(+), 134 deletions(-)
drivers/s390/net/qeth.h +14 -5
@@ -24,7 +24,7 @@#include "qeth_mpc.h" -#define VERSION_QETH_H "$Revision: 1.129 $" +#define VERSION_QETH_H "$Revision: 1.132 $"#ifdef CONFIG_QETH_IPV6 #define QETH_VERSION_IPV6 ":IPv6"
@@ -754,6 +754,8 @@struct qeth_perf_stats perf_stats;#endif /* CONFIG_QETH_PERF_STATS */ int use_hard_stop; +int (*orig_hard_header)(struct sk_buff *,struct net_device *, +unsigned short ,void *,void *,unsigned ); };struct qeth_card_list_struct {
@@ -828,6 +830,17 @@#endif } } +static inline struct sk_buff * +qeth_pskb_unshare (struct sk_buff *skb,int pri) +{ +struct sk_buff *nskb; +if (!skb_cloned (skb)) +return skb; + nskb =skb_copy (skb, pri); +kfree_skb (skb);/* free our shared copy */ +return nskb; +} +inline static int qeth_get_initial_mtu_for_card (struct qeth_card * card)
@@ -1071,8 +1084,4 @@extern int qeth_realloc_buffer_pool (struct qeth_card *,int ); -extern int -qeth_fake_header (struct sk_buff *skb,struct net_device *dev, -unsigned short type,void *daddr,void *saddr, -unsigned len);#endif /* __QETH_H__ */
drivers/s390/net/qeth_main.c +234 -117
549 lines not on this page · raw message
drivers/s390/net/qeth_sys.c +4 -12
@@ -1,6 +1,6 @@/* * -* linux/drivers/s390/net/qeth_sys.c ($Revision: 1.48 $) +* linux/drivers/s390/net/qeth_sys.c ($Revision: 1.49 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs.
@@ -20,7 +20,7 @@#include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C ="$Revision: 1.48 $" ; +const char *VERSION_QETH_SYS_C ="$Revision: 1.49 $" ;/*****************************************************************************/ /* */
@@ -514,19 +514,11 @@return -EPERM ; i =simple_strtoul (buf, &tmp,16 ); -if ((i ==0 ) || (i ==1 )) { - card->options.fake_ll = i; -if (card->dev) { -if (i) - card->dev->hard_header = qeth_fake_header; -else - card->dev->hard_header =NULL ; - } - } -else { +if ((i !=0 ) && (i !=1 )) {PRINT_WARN ("fake_ll: write 0 or 1 to this file!\n" );return -EINVAL ; } + card->options.fake_ll = i;return count; }