s390: qeth and lcs patches for 2.6.24 - RESEND
Subsystems (4)
cover s390: qeth and lcs patches for 2.6.24 - RESEND
Signature · 8 lines
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
PATCH 1/5 qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets
From: Klaus D. Wacker <[email protected]>
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.
---
drivers/s390/net/qeth_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_main.c +2 -2
@@ -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 ; }
Re: [patch 1/5] qeth: HiperSockets layer-3 interface drop non IPv4 or non IPv6 packets
applied 1-5
PATCH 2/5 qeth: EDDP does not work on large MTUs
In reply to Ursula BraunFrom: Frank Blaschka <[email protected]>
Fix filling the qdio buffers in EDDP mode.
---
drivers/s390/net/qeth_eddp.c | 16 +++++++++------- drivers/s390/net/qeth_main.c | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-)
drivers/s390/net/qeth_eddp.c +9 -7
@@ -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--; }
drivers/s390/net/qeth_main.c +2 -1
@@ -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; }
PATCH 3/5 qeth: avoid duplicate deletion of multicast addresses
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
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 <[email protected]>
---
drivers/s390/net/qeth_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_main.c +3 -2
@@ -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); } } }
PATCH 4/5 lcs: Channel errors drive lcs_recovery which leads to kernel panic.
In reply to Ursula BraunFrom: Klaus D. Wacker <[email protected]>
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.
---
drivers/s390/net/lcs.c | 11 ++++++++--- drivers/s390/net/lcs.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-)
drivers/s390/net/lcs.c +8 -3
@@ -1400,11 +1400,14 @@ lcs_irq(struct ccw_device *cdev, unsignePRINT_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 );
drivers/s390/net/lcs.h +1 -0
@@ -138,6 +138,7 @@ enum lcs_channel_states {LCS_CH_STATE_RUNNING ,LCS_CH_STATE_SUSPENDED ,LCS_CH_STATE_CLEARED , + LCS_CH_STATE_ERROR, };/**
PATCH 5/5 qeth: discard inbound packets with unknown header id
In reply to Ursula BraunFrom: Ursula Braun <[email protected]>
Debugging statements are added for inbound packets with unknown header id. Those packets are discarded and no longer processed as osn-packets.
---
drivers/s390/net/qeth_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_main.c +6 -1
@@ -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 )){
Did these patches change on resend? Or just addressees?
Jeff
Jeff,
patches have not changed on resend, just the header part of [patch 5/5].
Ursula
Jeff Garzik
<[email protected]>
Sent by: To
linux-s390-owner@ Ursula Braun1/Germany/IBM@IBMDE
vger.kernel.org cc
[email protected],
[email protected],
05.10.2007 17:07 [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html