* [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets
2007-10-05 7:38 [patch 0/5] s390: qeth and lcs patches for 2.6.24 Ursula Braun
@ 2007-10-05 7:38 ` Ursula Braun
0 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 7:38 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390; +Cc: Klaus D. Wacker
[-- Attachment #1: 705-qeth-pktdrop.diff --]
[-- Type: text/plain, Size: 1195 bytes --]
From: Klaus D. Wacker <kdwacker@de.ibm.com>
HiperSockets infrastructure (layer-3 mode) supports only IPv4 or
IPv6 packets. Sending other packet types disturbs TCP/IP on z/VM,
which issues messages about invalid packets.
Qeth send routine will detect packet type on sending over a
HiperSockets interface (in layer-3 mode) and drop non IP packets.
The error and drop count of the interface is incremented.
Signed-off-by: Klaus D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_main.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_main.c
@@ -4711,8 +4711,8 @@ qeth_send_packet(struct qeth_card *card,
rc = qeth_do_send_packet(card, queue, new_skb, hdr,
elements_needed, ctx);
else {
- if ((skb->protocol == htons(ETH_P_ARP)) &&
- (card->dev->flags & IFF_NOARP)) {
+ if ((!card->options.layer2) &&
+ (ipv == 0)) {
__qeth_free_new_skb(skb, new_skb);
return -EPERM;
}
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND
@ 2007-10-05 14:45 Ursula Braun
2007-10-05 14:45 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390
--
Sorry, 2nd attempt, because patch 5/5 missed title line
The following patches in qeth and lcs driver are intended for 2.6.24:
- qeth: drop non-IP outbound packets on HiperSocket devices
- qeth: EDDP-mode - correct filling of qdio buffers
- qeth: avoid duplicate deletion of multicast addresses
- lcs: avoid kernel panic in lcs_recovery driven by channel errors
- qeth: discard inbound packets with unknown header id
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
@ 2007-10-05 14:45 ` Ursula Braun
2007-10-05 17:55 ` Jeff Garzik
2007-10-05 14:45 ` [patch 2/5] qeth: EDDP does not work on large MTUs Ursula Braun
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390; +Cc: Klaus D. Wacker
[-- Attachment #1: 705-qeth-pktdrop.diff --]
[-- Type: text/plain, Size: 1195 bytes --]
From: Klaus D. Wacker <kdwacker@de.ibm.com>
HiperSockets infrastructure (layer-3 mode) supports only IPv4 or
IPv6 packets. Sending other packet types disturbs TCP/IP on z/VM,
which issues messages about invalid packets.
Qeth send routine will detect packet type on sending over a
HiperSockets interface (in layer-3 mode) and drop non IP packets.
The error and drop count of the interface is incremented.
Signed-off-by: Klaus D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_main.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_main.c
@@ -4711,8 +4711,8 @@ qeth_send_packet(struct qeth_card *card,
rc = qeth_do_send_packet(card, queue, new_skb, hdr,
elements_needed, ctx);
else {
- if ((skb->protocol == htons(ETH_P_ARP)) &&
- (card->dev->flags & IFF_NOARP)) {
+ if ((!card->options.layer2) &&
+ (ipv == 0)) {
__qeth_free_new_skb(skb, new_skb);
return -EPERM;
}
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 2/5] qeth: EDDP does not work on large MTUs
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
2007-10-05 14:45 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
@ 2007-10-05 14:45 ` Ursula Braun
2007-10-05 14:45 ` [patch 3/5] qeth: avoid duplicate deletion of multicast addresses Ursula Braun
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390; +Cc: Frank Blaschka
[-- Attachment #1: 708-qeth-eddp.diff --]
[-- Type: text/plain, Size: 2048 bytes --]
From: Frank Blaschka <frank.blaschka@de.ibm.com>
Fix filling the qdio buffers in EDDP mode.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_eddp.c | 16 +++++++++-------
drivers/s390/net/qeth_main.c | 3 ++-
2 files changed, 11 insertions(+), 8 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/qeth_eddp.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_eddp.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_eddp.c
@@ -159,13 +159,15 @@ qeth_eddp_fill_buffer(struct qeth_qdio_o
buffer = buf->buffer;
/* fill one skb into buffer */
for (i = 0; i < ctx->elements_per_skb; ++i){
- buffer->element[buf->next_element_to_fill].addr =
- ctx->elements[element].addr;
- buffer->element[buf->next_element_to_fill].length =
- ctx->elements[element].length;
- buffer->element[buf->next_element_to_fill].flags =
- ctx->elements[element].flags;
- buf->next_element_to_fill++;
+ if (ctx->elements[element].length != 0) {
+ buffer->element[buf->next_element_to_fill].
+ addr = ctx->elements[element].addr;
+ buffer->element[buf->next_element_to_fill].
+ length = ctx->elements[element].length;
+ buffer->element[buf->next_element_to_fill].
+ flags = ctx->elements[element].flags;
+ buf->next_element_to_fill++;
+ }
element++;
elements--;
}
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_main.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_main.c
@@ -4500,7 +4500,8 @@ qeth_do_send_packet(struct qeth_card *ca
/* check if we have enough elements (including following
* free buffers) to handle eddp context */
if (qeth_eddp_check_buffers_for_context(queue,ctx) < 0){
- printk("eddp tx_dropped 1\n");
+ if (net_ratelimit())
+ PRINT_WARN("eddp tx_dropped 1\n");
rc = -EBUSY;
goto out;
}
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 3/5] qeth: avoid duplicate deletion of multicast addresses
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
2007-10-05 14:45 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
2007-10-05 14:45 ` [patch 2/5] qeth: EDDP does not work on large MTUs Ursula Braun
@ 2007-10-05 14:45 ` Ursula Braun
2007-10-05 14:45 ` [patch 4/5] lcs: Channel errors drive lcs_recovery which leads to kernel panic Ursula Braun
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390
[-- Attachment #1: 709-qeth-multicast.diff --]
[-- Type: text/plain, Size: 1257 bytes --]
From: Ursula Braun <braunu@de.ibm.com>
if qeth_set_multicast_list() is performed on 2 CPUs in parallel,
card->ip_list may end corrupted.
Solution: In function __qeth_delete_all_mc()
remove card->ip_list entry before invoking
qeth_deregister_addr_entry(). Thus a 2nd invocation of
qeth_set_multicast_list() cannot try to remove the
same entry twice.
Signed-off-by Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_main.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_main.c
@@ -820,14 +820,15 @@ __qeth_delete_all_mc(struct qeth_card *c
again:
list_for_each_entry_safe(addr, tmp, &card->ip_list, entry) {
if (addr->is_multicast) {
+ list_del(&addr->entry);
spin_unlock_irqrestore(&card->ip_lock, *flags);
rc = qeth_deregister_addr_entry(card, addr);
spin_lock_irqsave(&card->ip_lock, *flags);
if (!rc) {
- list_del(&addr->entry);
kfree(addr);
goto again;
- }
+ } else
+ list_add(&addr->entry, &card->ip_list);
}
}
}
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 4/5] lcs: Channel errors drive lcs_recovery which leads to kernel panic.
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
` (2 preceding siblings ...)
2007-10-05 14:45 ` [patch 3/5] qeth: avoid duplicate deletion of multicast addresses Ursula Braun
@ 2007-10-05 14:45 ` Ursula Braun
2007-10-05 14:45 ` [patch 5/5] qeth: discard inbound packets with unknown header id Ursula Braun
2007-10-05 15:07 ` [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Jeff Garzik
5 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390; +Cc: Klaus D. Wacker
[-- Attachment #1: 710-lcs-panic.diff --]
[-- Type: text/plain, Size: 2164 bytes --]
From: Klaus D. Wacker <kdwacker@de.ibm.com>
When the lcs irq routine detects channel failures it drives device recovery.
After this event the device is no longer usable for shutdown requests,
because the lcs_irq routine may get wrong channel status information.
In such a case the lcs_irq routine marks the channel in 'error' state.
The channel state comes back to 'running' after restarting the channels.
Signed-off-by: Klaus D. Wacker <kdwacker@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/lcs.c | 11 ++++++++---
drivers/s390/net/lcs.h | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/lcs.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/lcs.c
+++ linux-2.6-uschi/drivers/s390/net/lcs.c
@@ -1400,11 +1400,14 @@ lcs_irq(struct ccw_device *cdev, unsigne
PRINT_WARN("check on device %s, dstat=0x%X, cstat=0x%X \n",
cdev->dev.bus_id, dstat, cstat);
if (rc) {
- lcs_schedule_recovery(card);
- wake_up(&card->wait_q);
- return;
+ channel->state = LCS_CH_STATE_ERROR;
}
}
+ if (channel->state == LCS_CH_STATE_ERROR) {
+ lcs_schedule_recovery(card);
+ wake_up(&card->wait_q);
+ return;
+ }
/* How far in the ccw chain have we processed? */
if ((channel->state != LCS_CH_STATE_INIT) &&
(irb->scsw.fctl & SCSW_FCTL_START_FUNC)) {
@@ -1708,6 +1711,8 @@ lcs_stopcard(struct lcs_card *card)
if (card->read.state != LCS_CH_STATE_STOPPED &&
card->write.state != LCS_CH_STATE_STOPPED &&
+ card->read.state != LCS_CH_STATE_ERROR &&
+ card->write.state != LCS_CH_STATE_ERROR &&
card->state == DEV_STATE_UP) {
lcs_clear_multicast_list(card);
rc = lcs_send_stoplan(card,LCS_INITIATOR_TCPIP);
Index: linux-2.6-uschi/drivers/s390/net/lcs.h
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/lcs.h
+++ linux-2.6-uschi/drivers/s390/net/lcs.h
@@ -138,6 +138,7 @@ enum lcs_channel_states {
LCS_CH_STATE_RUNNING,
LCS_CH_STATE_SUSPENDED,
LCS_CH_STATE_CLEARED,
+ LCS_CH_STATE_ERROR,
};
/**
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* [patch 5/5] qeth: discard inbound packets with unknown header id
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
` (3 preceding siblings ...)
2007-10-05 14:45 ` [patch 4/5] lcs: Channel errors drive lcs_recovery which leads to kernel panic Ursula Braun
@ 2007-10-05 14:45 ` Ursula Braun
2007-10-05 15:07 ` [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Jeff Garzik
5 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun @ 2007-10-05 14:45 UTC (permalink / raw)
To: davem, netdev, linux-s390
[-- Attachment #1: qeth-inbound.diff --]
[-- Type: text/plain, Size: 1217 bytes --]
From: Ursula Braun <braunu@de.ibm.com>
Debugging statements are added for inbound packets with unknown
header id. Those packets are discarded and no longer processed as
osn-packets.
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: linux-2.6-uschi/drivers/s390/net/qeth_main.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/qeth_main.c
+++ linux-2.6-uschi/drivers/s390/net/qeth_main.c
@@ -2699,10 +2699,15 @@ qeth_process_inbound_buffer(struct qeth_
qeth_layer2_rebuild_skb(card, skb, hdr);
else if (hdr->hdr.l3.id == QETH_HEADER_TYPE_LAYER3)
vlan_tag = qeth_rebuild_skb(card, skb, hdr);
- else { /*in case of OSN*/
+ else if (hdr->hdr.osn.id == QETH_HEADER_TYPE_OSN) {
skb_push(skb, sizeof(struct qeth_hdr));
skb_copy_to_linear_data(skb, hdr,
sizeof(struct qeth_hdr));
+ } else { /* unknown header type */
+ dev_kfree_skb_any(skb);
+ QETH_DBF_TEXT(trace, 3, "inbunkno");
+ QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN);
+ continue;
}
/* is device UP ? */
if (!(card->dev->flags & IFF_UP)){
--
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
` (4 preceding siblings ...)
2007-10-05 14:45 ` [patch 5/5] qeth: discard inbound packets with unknown header id Ursula Braun
@ 2007-10-05 15:07 ` Jeff Garzik
2007-10-05 15:35 ` Ursula Braun1
5 siblings, 1 reply; 10+ messages in thread
From: Jeff Garzik @ 2007-10-05 15:07 UTC (permalink / raw)
To: Ursula Braun; +Cc: davem, netdev, linux-s390
Did these patches change on resend? Or just addressees?
Jeff
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND
2007-10-05 15:07 ` [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Jeff Garzik
@ 2007-10-05 15:35 ` Ursula Braun1
0 siblings, 0 replies; 10+ messages in thread
From: Ursula Braun1 @ 2007-10-05 15:35 UTC (permalink / raw)
To: Jeff Garzik; +Cc: davem, netdev, linux-s390
Jeff,
patches have not changed on resend, just the header part of [patch 5/5].
Ursula
Jeff Garzik
<jeff@garzik.org>
Sent by: To
linux-s390-owner@ Ursula Braun1/Germany/IBM@IBMDE
vger.kernel.org cc
davem@davemloft.net,
netdev@vger.kernel.org,
05.10.2007 17:07 linux-s390@vger.kernel.org
Subject
Re: [patch 0/5] s390: qeth and lcs
patches for 2.6.24 - RESEND
Did these patches change on resend? Or just addressees?
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets
2007-10-05 14:45 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
@ 2007-10-05 17:55 ` Jeff Garzik
0 siblings, 0 replies; 10+ messages in thread
From: Jeff Garzik @ 2007-10-05 17:55 UTC (permalink / raw)
To: Ursula Braun; +Cc: davem, netdev, linux-s390, Klaus D. Wacker
applied 1-5
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-10-05 17:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05 14:45 [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Ursula Braun
2007-10-05 14:45 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
2007-10-05 17:55 ` Jeff Garzik
2007-10-05 14:45 ` [patch 2/5] qeth: EDDP does not work on large MTUs Ursula Braun
2007-10-05 14:45 ` [patch 3/5] qeth: avoid duplicate deletion of multicast addresses Ursula Braun
2007-10-05 14:45 ` [patch 4/5] lcs: Channel errors drive lcs_recovery which leads to kernel panic Ursula Braun
2007-10-05 14:45 ` [patch 5/5] qeth: discard inbound packets with unknown header id Ursula Braun
2007-10-05 15:07 ` [patch 0/5] s390: qeth and lcs patches for 2.6.24 - RESEND Jeff Garzik
2007-10-05 15:35 ` Ursula Braun1
-- strict thread matches above, loose matches on Subject: below --
2007-10-05 7:38 [patch 0/5] s390: qeth and lcs patches for 2.6.24 Ursula Braun
2007-10-05 7:38 ` [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets Ursula Braun
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).