s390: qeth patches for net-next
Subsystems (4)
cover s390: qeth patches for net-next
Hi Dave,
here is another patch set for net-next.
shortlog:
Jan Glauber (1)
qeth: buffer count imbalance
Einar Lueck (2)
qeth: support ipv6 query arp cache for HiperSockets
qeth: support VIPA add/del in offline mode
Frank Blaschka (1)
qeth: l3 add vlan hdr in passthru frames
Thanks,
Frank
PATCH 1/4 qeth: support ipv6 query arp cache for HiperSockets
From: Einar Lueck <[email protected]>
Function qeth_l3_arp_query now queries for IPv6 addresses, too, if QETH_QARP_WITH_IPV6 is passed as parameter to the ioctl. HiperSockets and GuestLAN in HiperSockets mode provide corresponding entries.
---
arch/s390/include/asm/qeth.h | 51 +++++++-- drivers/s390/net/qeth_core_mpc.h | 2 drivers/s390/net/qeth_l3_main.c | 219 +++++++++++++++++++++++++-------------- 3 files changed, 187 insertions(+), 85 deletions(-)
arch/s390/include/asm/qeth.h +41 -10
@@ -28,39 +28,70 @@ struct qeth_arp_cache_entry {__u8 reserved2[32 ]; } __attribute__ ((packed)); +enum qeth_arp_ipaddrtype { +QETHARP_IP_ADDR_V4 =1 , +QETHARP_IP_ADDR_V6 =2 , +}; +struct qeth_arp_entrytype { +__u8 mac; +__u8 ip; +} __attribute__((packed)); + +#define QETH_QARP_MEDIASPECIFIC_BYTES 32 +#define QETH_QARP_MACADDRTYPE_BYTES 1struct qeth_arp_qi_entry7 { -__u8 media_specific[32 ]; -__u8 macaddr_type; -__u8 ipaddr_type; +__u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES ]; +struct qeth_arp_entrytype type;__u8 macaddr[6 ];__u8 ipaddr[4 ]; } __attribute__((packed)); +struct qeth_arp_qi_entry7_ipv6 { +__u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES ]; +struct qeth_arp_entrytype type; +__u8 macaddr[6 ]; +__u8 ipaddr[16 ]; +} __attribute__((packed)); +struct qeth_arp_qi_entry7_short { -__u8 macaddr_type; -__u8 ipaddr_type; +struct qeth_arp_entrytype type;__u8 macaddr[6 ];__u8 ipaddr[4 ]; } __attribute__((packed)); +struct qeth_arp_qi_entry7_short_ipv6 { +struct qeth_arp_entrytype type; +__u8 macaddr[6 ]; +__u8 ipaddr[16 ]; +} __attribute__((packed)); +struct qeth_arp_qi_entry5 { -__u8 media_specific[32 ]; -__u8 macaddr_type; -__u8 ipaddr_type; +__u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES ]; +struct qeth_arp_entrytype type;__u8 ipaddr[4 ]; } __attribute__((packed)); +struct qeth_arp_qi_entry5_ipv6 { +__u8 media_specific[QETH_QARP_MEDIASPECIFIC_BYTES ]; +struct qeth_arp_entrytype type; +__u8 ipaddr[16 ]; +} __attribute__((packed)); +struct qeth_arp_qi_entry5_short { -__u8 macaddr_type; -__u8 ipaddr_type; +struct qeth_arp_entrytype type;__u8 ipaddr[4 ]; } __attribute__((packed)); +struct qeth_arp_qi_entry5_short_ipv6 { +struct qeth_arp_entrytype type; +__u8 ipaddr[16 ]; +} __attribute__((packed));/* * can be set by user if no "media specific information" is wanted * -> saves a lot of space in user space buffer */ #define QETH_QARP_STRIP_ENTRIES 0x8000 +#define QETH_QARP_WITH_IPV6 0x4000#define QETH_QARP_REQUEST_MASK 0x00ff/* data sent to user space as result of query arp ioctl */
drivers/s390/net/qeth_core_mpc.h +1 -1
@@ -333,7 +333,7 @@ struct qeth_arp_query_data {__u16 request_bits;__u16 reply_bits;__u32 no_entries; -char data; +char data;/* only for replies */ } __attribute__((packed));/* used as parameter for arp_query reply */
drivers/s390/net/qeth_l3_main.c +145 -74
290 lines not on this page · raw message
PATCH 2/4 qeth: support VIPA add/del in offline mode
In reply to [email protected]From: Einar Lueck <[email protected]>
Only work through the IP adddress to do list if the card is UP or SOFTSETUP. Enables to configure VIPA add/del in offline mode.
---
drivers/s390/net/qeth_l3_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_l3_main.c +4 -1
@@ -456,8 +456,11 @@ static void qeth_l3_set_ip_addr_list(strQETH_CARD_TEXT (card,2 ,"sdiplist" );QETH_CARD_HEX (card,2 , &card,sizeof (void *)); -if (card->options.sniffer) +if ((card->state !=CARD_STATE_UP && + card->state !=CARD_STATE_SOFTSETUP ) || card->options.sniffer) {return ; + } +spin_lock_irqsave (&card->ip_lock, flags); tbd_list = card->ip_tbd_list; card->ip_tbd_list =kmalloc (sizeof (struct list_head ),GFP_ATOMIC );
PATCH 3/4 qeth: l3 add vlan hdr in passthru frames
In reply to [email protected]From: Frank Blaschka <[email protected]>
OSA l3 mode is hw accelerated VLAN only for IPv4. Take care we add the vlan hdr to a passthru frame in the device driver.
---
drivers/s390/net/qeth_l3_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/net/qeth_l3_main.c +1 -1
@@ -3115,7 +3115,7 @@ static int qeth_l3_hard_start_xmit(strucskb_pull (new_skb,ETH_HLEN ); } -if (ipv ==6 && card->vlangrp && +if (ipv !=4 && card->vlangrp &&vlan_tx_tag_present (new_skb)) {skb_push (new_skb,VLAN_HLEN );skb_copy_to_linear_data (new_skb, new_skb->data +4 ,4 );
PATCH 4/4 qeth: buffer count imbalance
In reply to [email protected]From: Jan Glauber <[email protected]>
The used buffers counter is not incremented in case of an error so the counter can become negative. Increment the used buffers counter before checking for errors.
---
drivers/s390/net/qeth_core_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/net/qeth_core_main.c +1 -1
@@ -2840,6 +2840,7 @@ static void qeth_flush_buffers(struct qe queue->card->perf_stats.outbound_do_qdio_time +=qeth_get_micros () - queue->card->perf_stats.outbound_do_qdio_start_time; +atomic_add (count, &queue->used_buffers);if (rc) { queue->card->stats.tx_errors += count;/* ignore temporary SIGA errors without busy condition */
@@ -2853,7 +2854,6 @@ static void qeth_flush_buffers(struct qeqeth_schedule_recovery (queue->card);return ; } -atomic_add (count, &queue->used_buffers);if (queue->card->options.performance_stats) queue->card->perf_stats.bufs_sent += count; }
David Miller
maintainerFrom: [email protected]
Date: Wed, 08 Dec 2010 13:57:57 +0100
Quoted 1 line
here is another patch set for net-next.
All applied, thank you.