]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-06-01-qeth-ext-src-mac-addr.patch
Fix oinkmaster patch.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-06-01-qeth-ext-src-mac-addr.patch
CommitLineData
2cb7cef9
BS
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: qeth: exploit source MAC address for inbound layer3 packets
3References: bnc#458339
4
5Symptom: tcpdump showing "FAKELL" for inbound layer3 packets
6Problem: OSA-devices operating in layer3 mode offer adding of the
7 source MAC address to the QDIO header of inbound packets.
8 This support is not exploited yet.
9Solution: Make use of this functionality to replace FAKELL-entries in
10 the ethernet header of received packets.
11
12Acked-by: John Jolly <jjolly@suse.de>
13---
14
15 drivers/s390/net/qeth_core.h | 1 -
16 drivers/s390/net/qeth_core_main.c | 1 -
17 drivers/s390/net/qeth_l3_main.c | 16 +++++++++-------
18 3 files changed, 9 insertions(+), 9 deletions(-)
19
20Index: linux-sles11/drivers/s390/net/qeth_core.h
21===================================================================
22--- linux-sles11.orig/drivers/s390/net/qeth_core.h
23+++ linux-sles11/drivers/s390/net/qeth_core.h
24@@ -642,7 +642,6 @@ struct qeth_card_options {
25 int macaddr_mode;
26 int fake_broadcast;
27 int add_hhlen;
28- int fake_ll;
29 int layer2;
30 enum qeth_large_send_types large_send;
31 int performance_stats;
32Index: linux-sles11/drivers/s390/net/qeth_core_main.c
33===================================================================
34--- linux-sles11.orig/drivers/s390/net/qeth_core_main.c
35+++ linux-sles11/drivers/s390/net/qeth_core_main.c
36@@ -1071,7 +1071,6 @@ static void qeth_set_intial_options(stru
37 card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL;
38 card->options.fake_broadcast = 0;
39 card->options.add_hhlen = DEFAULT_ADD_HHLEN;
40- card->options.fake_ll = 0;
41 card->options.performance_stats = 0;
42 card->options.rx_sg_cb = QETH_RX_SG_CB;
43 }
44Index: linux-sles11/drivers/s390/net/qeth_l3_main.c
45===================================================================
46--- linux-sles11.orig/drivers/s390/net/qeth_l3_main.c
47+++ linux-sles11/drivers/s390/net/qeth_l3_main.c
48@@ -1206,12 +1206,9 @@ static int qeth_l3_start_ipa_source_mac(
49
50 QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
51
52- if (!card->options.fake_ll)
53- return -EOPNOTSUPP;
54-
55 if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
56 dev_info(&card->gdev->dev,
57- "Inbound source address not supported on %s\n",
58+ "Inbound source MAC-address not supported on %s\n",
59 QETH_CARD_IFNAME(card));
60 return -EOPNOTSUPP;
61 }
62@@ -1920,8 +1917,13 @@ static inline __u16 qeth_l3_rebuild_skb(
63 memcpy(tg_addr, card->dev->dev_addr,
64 card->dev->addr_len);
65 }
66- card->dev->header_ops->create(skb, card->dev, prot, tg_addr,
67- "FAKELL", card->dev->addr_len);
68+ if (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_SRC_MAC_ADDR)
69+ card->dev->header_ops->create(skb, card->dev, prot,
70+ tg_addr, &hdr->hdr.l3.dest_addr[2],
71+ card->dev->addr_len);
72+ else
73+ card->dev->header_ops->create(skb, card->dev, prot,
74+ tg_addr, "FAKELL", card->dev->addr_len);
75 }
76
77 #ifdef CONFIG_TR
78Index: linux-sles11/Documentation/kmsg/s390/qeth
79===================================================================
80--- linux-sles11.orig/Documentation/kmsg/s390/qeth
81+++ linux-sles11/Documentation/kmsg/s390/qeth
82@@ -275,7 +275,7 @@
83
84 /*?
85 * Text: "%s: Activating IPv6 support for %s failed\n"
86- * Severity: Error
87+ * Severity: Warning
88 * Parameter:
89 * @1: bus ID of the qeth device
90 * @2: network interface name
91@@ -437,6 +437,21 @@
92 * want to use IPv6 with layer 3 qeth devices.
93 */
94
95+/*?
96+ * Text: "%s: Starting source MAC-address support for %s failed\n"
97+ * Severity: Warning
98+ * Parameter:
99+ * @1: bus ID of the qeth device
100+ * @2: network interface name
101+ * Description:
102+ * The qeth device driver could not enable source MAC-address on the network
103+ * adapter.
104+ * User action:
105+ * Ungroup and regroup the subchannel triplet of the device. If this does not
106+ * resolve the problem, reboot Linux. If the problem persists, gather Linux
107+ * debug data and report the problem to your support organization.
108+ */
109+
110 /*? Text: "core functions removed\n" */
111 /*? Text: "%s: Device is a%s card%s%s%s\nwith link type %s.\n" */
112 /*? Text: "%s: Device is a%s card%s%s%s\nwith link type %s (no portname needed by interface).\n" */
113@@ -452,7 +467,7 @@
114 /*? Text: "%s: Hardware IP fragmentation not supported on %s\n" */
115 /*? Text: "%s: IPv6 not supported on %s\n" */
116 /*? Text: "%s: VLAN not supported on %s\n" */
117-/*? Text: "%s: Inbound source address not supported on %s\n" */
118+/*? Text: "%s: Inbound source MAC-address not supported on %s\n" */
119 /*? Text: "%s: IPV6 enabled\n" */
120 /*? Text: "%s: ARP processing not supported on %s!\n" */
121 /*? Text: "%s: Hardware IP fragmentation enabled \n" */