s390: qeth patches for 2.6.33
Subsystems (4)
cover s390: qeth patches for 2.6.33
Hi Dave,
here is a set of qeth patches for 2.6.33 (net-next).
shortlog:
Einar Lueck (1)
qeth: Exploit Connection Isolation
Ursula Braun (2)
qeth: remaining EDDP cleanup
qeth: Recognize return codes of ccw_device_set_online
Frank Blaschka (2)
qeth: rework TSO functions
qeth: allow dynamic change of rx checksumming
Thanks,
Frank
PATCH 1/5 qeth: Exploit Connection Isolation
From: Einar Lueck <[email protected]>
Isolate data connection to a shared OSA card against other data connections to the same OSA card. Connectivity between isolated data connections sharing the same OSA card is therefore possible only through external network gear (e.g. a router).
---
drivers/s390/net/qeth_core.h | 2 drivers/s390/net/qeth_core_main.c | 151 ++++++++++++++++++++++++++++++++++++++ drivers/s390/net/qeth_core_mpc.h | 45 ++++++++--- drivers/s390/net/qeth_core_sys.c | 77 +++++++++++++++++++ drivers/s390/net/qeth_l2_main.c | 2 drivers/s390/net/qeth_l3_main.c | 2 6 files changed, 267 insertions(+), 12 deletions(-)
drivers/s390/net/qeth_core.h +2 -0
@@ -648,6 +648,7 @@ struct qeth_card_options {enum qeth_large_send_types large_send;int performance_stats;int rx_sg_cb; +enum qeth_ipa_isolation_modes isolation; };/*
@@ -856,6 +857,7 @@ void qeth_core_get_strings(struct net_devoid qeth_core_get_drvinfo (struct net_device *,struct ethtool_drvinfo *);void qeth_dbf_longtext (enum qeth_dbf_names dbf_nix,int level,char *text, ...);int qeth_core_ethtool_get_settings (struct net_device *,struct ethtool_cmd *); +int qeth_set_access_ctrl_online (struct qeth_card *card);/* exports for OSN */ int qeth_osn_assist (struct net_device *,void *,int );
drivers/s390/net/qeth_core_main.c +151 -0
163 lines not on this page · raw message
drivers/s390/net/qeth_core_mpc.h +33 -12
69 lines not on this page · raw message
drivers/s390/net/qeth_core_sys.c +77 -0
89 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +2 -0
@@ -988,6 +988,8 @@ static int __qeth_l2_set_online(struct c card->lan_online =1 ;if (card->info.type !=QETH_CARD_TYPE_OSN ) { +/* configure isolation level */ +qeth_set_access_ctrl_online (card);qeth_set_large_send (card, card->options.large_send);qeth_l2_process_vlans (card,0 ); }
drivers/s390/net/qeth_l3_main.c +2 -0
@@ -1506,6 +1506,8 @@ static int qeth_l3_start_ipa_tso(structstatic int qeth_l3_start_ipassists (struct qeth_card *card) {QETH_DBF_TEXT (TRACE ,3 ,"strtipas" ); + +qeth_set_access_ctrl_online (card);/* go on*/ qeth_l3_start_ipa_arp_processing (card);/* go on*/ qeth_l3_start_ipa_ip_fragmentation (card);/* go on*/ qeth_l3_start_ipa_source_mac (card);/* go on*/
PATCH 2/5 qeth: remaining EDDP cleanup
In reply to [email protected]From: Ursula Braun <[email protected]>
EDDP code has been removed from qeth in 2009. This patch removes two useless remaining EDDP-references.
---
drivers/s390/net/qeth_core.h | 2 -- 1 file changed, 2 deletions(-)
drivers/s390/net/qeth_core.h +0 -2
@@ -122,7 +122,6 @@ struct qeth_perf_stats {__u64 outbound_do_qdio_start_time;unsigned int outbound_do_qdio_cnt;unsigned int outbound_do_qdio_time; -/* eddp data */ unsigned int large_send_bytes;unsigned int large_send_cnt;unsigned int sg_skbs_sent;
@@ -777,7 +776,6 @@ static inline void qeth_put_buffer_pool_list_add_tail (&entry->list, &card->qdio.in_buf_pool.entry_list); } -struct qeth_eddp_context ;extern struct ccwgroup_driver qeth_l2_ccwgroup_driver;extern struct ccwgroup_driver qeth_l3_ccwgroup_driver;const char *qeth_get_cardname_short (struct qeth_card *);
PATCH 3/5 qeth: Recognize return codes of ccw_device_set_online
In reply to [email protected]From: Ursula Braun <[email protected]>
Setting a qeth device online requires to call function ccw_device_set_online() for read-, write-, and data-subchannel. Failures should be detected immediately without an attempt to invoke follow-on activity qeth_qdio_clear_card().,
In addition, ccw_device_set_online calls are consolidated in qeth_core_main.c only.
---
drivers/s390/net/qeth_core_main.c | 26 ++++++++++++++++---------- drivers/s390/net/qeth_l2_main.c | 26 ++++++++------------------ drivers/s390/net/qeth_l3_main.c | 25 +++++++------------------ 3 files changed, 31 insertions(+), 46 deletions(-)
drivers/s390/net/qeth_core_main.c +16 -10
@@ -3883,30 +3883,36 @@ static int qeth_core_driver_group(constint qeth_core_hardsetup_card (struct qeth_card *card) {struct qdio_ssqd_desc *ssqd; -int retries =3 ; +int retries =0 ;int mpno =0 ;int rc;QETH_DBF_TEXT (SETUP ,2 ,"hrdsetup" );atomic_set (&card->force_alloc_skb,0 ); retry: -if (retries <3 ) { +if (retries)QETH_DBF_MESSAGE (2 ,"%s Retrying to do IDX activates.\n" ,dev_name (&card->gdev->dev)); -ccw_device_set_offline (CARD_DDEV (card)); -ccw_device_set_offline (CARD_WDEV (card)); -ccw_device_set_offline (CARD_RDEV (card)); -ccw_device_set_online (CARD_RDEV (card)); -ccw_device_set_online (CARD_WDEV (card)); -ccw_device_set_online (CARD_DDEV (card)); - } +ccw_device_set_offline (CARD_DDEV (card)); +ccw_device_set_offline (CARD_WDEV (card)); +ccw_device_set_offline (CARD_RDEV (card)); + rc =ccw_device_set_online (CARD_RDEV (card)); +if (rc) + goto retriable; + rc =ccw_device_set_online (CARD_WDEV (card)); +if (rc) + goto retriable; + rc =ccw_device_set_online (CARD_DDEV (card)); +if (rc) + goto retriable; rc =qeth_qdio_clear_card (card, card->info.type !=QETH_CARD_TYPE_IQD ); +retriable:if (rc == -ERESTARTSYS ) {QETH_DBF_TEXT (SETUP ,2 ,"break1" );return rc; }else if (rc) {QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -if (--retries <0 ) +if (++retries >3 ) goto out;else goto retry;
drivers/s390/net/qeth_l2_main.c +8 -18
@@ -940,30 +940,17 @@ static int __qeth_l2_set_online(struct cqeth_set_allowed_threads (card,QETH_RECOVER_THREAD ,1 ); recover_flag = card->state; - rc =ccw_device_set_online (CARD_RDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =ccw_device_set_online (CARD_WDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =ccw_device_set_online (CARD_DDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =qeth_core_hardsetup_card (card);if (rc) {QETH_DBF_TEXT_ (SETUP ,2 ,"2err%d" , rc); + rc = -ENODEV ; goto out_remove; } -if (!card->dev &&qeth_l2_setup_netdev (card)) +if (!card->dev &&qeth_l2_setup_netdev (card)) { + rc = -ENODEV ; goto out_remove; + }if (card->info.type !=QETH_CARD_TYPE_OSN )qeth_l2_send_setmac (card, &card->dev->dev_addr[0 ]);
@@ -983,6 +970,7 @@ static int __qeth_l2_set_online(struct c card->lan_online =0 ;return 0 ; } + rc = -ENODEV ; goto out_remove; }else card->lan_online =1 ;
@@ -999,6 +987,7 @@ static int __qeth_l2_set_online(struct c rc =qeth_init_qdio_queues (card);if (rc) {QETH_DBF_TEXT_ (SETUP ,2 ,"6err%d" , rc); + rc = -ENODEV ; goto out_remove; } card->state =CARD_STATE_SOFTSETUP ;
@@ -1020,6 +1009,7 @@ static int __qeth_l2_set_online(struct c/* let user_space know that device is online */ kobject_uevent (&gdev->dev.kobj,KOBJ_CHANGE );return 0 ; + out_remove: card->use_hard_stop =1 ;qeth_l2_stop_card (card,0 );
@@ -1030,7 +1020,7 @@ out_remove: card->state =CARD_STATE_RECOVER ; else card->state = CARD_STATE_DOWN; -return -ENODEV ; +return rc; }static int qeth_l2_set_online (struct ccwgroup_device *gdev)
drivers/s390/net/qeth_l3_main.c +7 -18
@@ -3156,32 +3156,19 @@ static int __qeth_l3_set_online(struct cqeth_set_allowed_threads (card,QETH_RECOVER_THREAD ,1 ); recover_flag = card->state; - rc =ccw_device_set_online (CARD_RDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =ccw_device_set_online (CARD_WDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =ccw_device_set_online (CARD_DDEV (card)); -if (rc) { -QETH_DBF_TEXT_ (SETUP ,2 ,"1err%d" , rc); -return -EIO ; - } - rc =qeth_core_hardsetup_card (card);if (rc) {QETH_DBF_TEXT_ (SETUP ,2 ,"2err%d" , rc); + rc = -ENODEV ; goto out_remove; }qeth_l3_query_ipassists (card,QETH_PROT_IPV4 ); -if (!card->dev &&qeth_l3_setup_netdev (card)) +if (!card->dev &&qeth_l3_setup_netdev (card)) { + rc = -ENODEV ; goto out_remove; + } card->state =CARD_STATE_HARDSETUP ;qeth_print_status_message (card);
@@ -3198,6 +3185,7 @@ static int __qeth_l3_set_online(struct c card->lan_online =0 ;return 0 ; } + rc = -ENODEV ; goto out_remove; }else card->lan_online =1 ;
@@ -3220,6 +3208,7 @@ static int __qeth_l3_set_online(struct c rc =qeth_init_qdio_queues (card);if (rc) {QETH_DBF_TEXT_ (SETUP ,2 ,"6err%d" , rc); + rc = -ENODEV ; goto out_remove; } card->state =CARD_STATE_SOFTSETUP ;
@@ -3250,7 +3239,7 @@ out_remove: card->state =CARD_STATE_RECOVER ; else card->state = CARD_STATE_DOWN; -return -ENODEV ; +return rc; }static int qeth_l3_set_online (struct ccwgroup_device *gdev)
PATCH 4/5 qeth: rework TSO functions
In reply to [email protected]From: Frank Blaschka <[email protected]>
The maximum TSO size OSA can handle is 15 * PAGE_SIZE. This patch reduces gso_max_size to this value and adds some sanity checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions to the qeth_l3 module.
---
drivers/s390/net/qeth_core.h | 2 - drivers/s390/net/qeth_core_main.c | 37 +------------------ drivers/s390/net/qeth_core_sys.c | 48 ------------------------- drivers/s390/net/qeth_l2_main.c | 1 drivers/s390/net/qeth_l3.h | 1 drivers/s390/net/qeth_l3_main.c | 71 +++++++++++++++++++++++++++++++------- drivers/s390/net/qeth_l3_sys.c | 48 +++++++++++++++++++++++++ 7 files changed, 110 insertions(+), 98 deletions(-)
drivers/s390/net/qeth_core.h +1 -1
@@ -134,6 +134,7 @@ struct qeth_perf_stats {unsigned int sg_frags_rx;unsigned int sg_alloc_page_rx;unsigned int tx_csum; +unsigned int tx_lin; };/* Routing stuff */
@@ -835,7 +836,6 @@ void qeth_prepare_ipa_cmd(struct qeth_castruct qeth_cmd_buffer *qeth_wait_for_buffer (struct qeth_channel *);int qeth_mdio_read (struct net_device *,int ,int );int qeth_snmp_command (struct qeth_card *,char __user *); -int qeth_set_large_send (struct qeth_card *,enum qeth_large_send_types );struct qeth_cmd_buffer *qeth_get_adapter_cmd (struct qeth_card *,__u32 ,__u32 );int qeth_default_setadapterparms_cb (struct qeth_card *,struct qeth_reply *,unsigned long );
drivers/s390/net/qeth_core_main.c +2 -35
@@ -270,41 +270,6 @@ int qeth_realloc_buffer_pool(struct qethreturn qeth_alloc_buffer_pool (card); } -int qeth_set_large_send (struct qeth_card *card, -enum qeth_large_send_types type) -{ -int rc =0 ; - -if (card->dev ==NULL ) { - card->options.large_send = type; -return 0 ; - } -if (card->state ==CARD_STATE_UP ) -netif_tx_disable (card->dev); - card->options.large_send = type; -switch (card->options.large_send) { -case QETH_LARGE_SEND_TSO : -if (qeth_is_supported (card,IPA_OUTBOUND_TSO )) { - card->dev->features |=NETIF_F_TSO |NETIF_F_SG | -NETIF_F_HW_CSUM ; - }else { - card->dev->features &= ~(NETIF_F_TSO |NETIF_F_SG | -NETIF_F_HW_CSUM ); - card->options.large_send =QETH_LARGE_SEND_NO ; - rc = -EOPNOTSUPP ; - } -break ; -default :/* includes QETH_LARGE_SEND_NO */ - card->dev->features &= ~(NETIF_F_TSO |NETIF_F_SG | -NETIF_F_HW_CSUM ); -break ; - } -if (card->state ==CARD_STATE_UP ) -netif_wake_queue (card->dev); -return rc; -} -EXPORT_SYMBOL_GPL (qeth_set_large_send); -static int qeth_issue_next_read (struct qeth_card *card) {int rc;
@@ -4460,6 +4425,7 @@ static struct { {"tx do_QDIO time"}, {"tx do_QDIO count"}, {"tx csum"}, + {"tx lin"}, };int qeth_core_get_sset_count (struct net_device *dev,int stringset)
@@ -4517,6 +4483,7 @@ void qeth_core_get_ethtool_stats(struct data[31 ] = card->perf_stats.outbound_do_qdio_time; data[32 ] = card->perf_stats.outbound_do_qdio_cnt; data[33 ] = card->perf_stats.tx_csum; + data[34 ] = card->perf_stats.tx_lin; }EXPORT_SYMBOL_GPL (qeth_core_get_ethtool_stats);
drivers/s390/net/qeth_core_sys.c +0 -48
60 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +0 -1
@@ -978,7 +978,6 @@ static int __qeth_l2_set_online(struct cif (card->info.type !=QETH_CARD_TYPE_OSN ) {/* configure isolation level */ qeth_set_access_ctrl_online (card); -qeth_set_large_send (card, card->options.large_send);qeth_l2_process_vlans (card,0 ); }
drivers/s390/net/qeth_l3.h +1 -0
@@ -60,5 +60,6 @@ void qeth_l3_del_vipa(struct qeth_card *int qeth_l3_add_rxip (struct qeth_card *,enum qeth_prot_versions ,const u8 *);void qeth_l3_del_rxip (struct qeth_card *card,enum qeth_prot_versions ,const u8 *); +int qeth_l3_set_large_send (struct qeth_card *,enum qeth_large_send_types );#endif /* __QETH_L3_H__ */
drivers/s390/net/qeth_l3_main.c +58 -13
119 lines not on this page · raw message
drivers/s390/net/qeth_l3_sys.c +48 -0
60 lines not on this page · raw message
David Miller
maintainerRe: [patch 4/5] [PATCH] qeth: rework TSO functions
From: [email protected]
Date: Thu, 12 Nov 2009 11:11:44 +0100
Quoted 9 lines
From: Frank Blaschka <[email protected]>
The maximum TSO size OSA can handle is 15 *
PAGE_SIZE. This patch reducesgso_max_sizeto this value and adds some sanity checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions to theqeth_l3module.Signed-off-by Frank Blaschka <[email protected]>
Please don't add sysctl knobs for getting and setting TSO enabling, that's what ethtool is for.
Re: [patch 4/5] [PATCH] qeth: rework TSO functions
Quoted 11 lines · David Miller
From: [email protected]
Date: Thu, 12 Nov 2009 11:11:44 +0100Quoted 8 lines
From: Frank Blaschka <[email protected]>
The maximum TSO size OSA can handle is 15 *
PAGE_SIZE. This patch reducesgso_max_sizeto this value and adds some sanity checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions to theqeth_l3module.
Quoted 4 lines
Quoted 1 line
Signed-off-by Frank Blaschka <[email protected]>Please don't add sysctl knobs for getting and setting TSO enabling, that's what ethtool is for.
I did not add any new sysfs knobs for TSO. The old one was just moved from the core part of the driver to the L3 discipline. I know ethtool is the way to configure TSO and I would be happy to drop sysfs off, but we have to keep this legacy interface because of our customers and distributors. If you say there is no way to keep it let me know and I will rework the patch.
Quoted 4 lines
--
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
David Miller
maintainerRe: [patch 4/5] [PATCH] qeth: rework TSO functions
From: Frank Blaschka <[email protected]>
Date: Mon, 16 Nov 2009 07:58:37 +0100
Quoted 6 lines
I did not add any new sysfs knobs for TSO. The old one was just moved from the core part of the driver to the L3 discipline. I know ethtool is the way to configure TSO and I would be happy to drop sysfs off, but we have to keep this legacy interface because of our customers and distributors. If you say there is no way to keep it let me know and I will rework the patch.
Ok, if it's always been there :-/ It never should have been added in the first place.
I'll add these patches to net-next-2.6, thanks.
PATCH 5/5 qeth: allow dynamic change of rx checksumming
In reply to [email protected]From: Frank Blaschka <[email protected]>
Technically there is no need to set the card offline to change RX checksumming. Get rid of this stupid limitation.
---
drivers/s390/net/qeth_l3.h | 1 drivers/s390/net/qeth_l3_main.c | 44 +++++++++++++++++++++++++++------------- drivers/s390/net/qeth_l3_sys.c | 19 +++++++++-------- 3 files changed, 41 insertions(+), 23 deletions(-)
drivers/s390/net/qeth_l3.h +1 -0
@@ -61,5 +61,6 @@ int qeth_l3_add_rxip(struct qeth_card *,void qeth_l3_del_rxip (struct qeth_card *card,enum qeth_prot_versions ,const u8 *);int qeth_l3_set_large_send (struct qeth_card *,enum qeth_large_send_types ); +int qeth_l3_set_rx_csum (struct qeth_card *,enum qeth_checksum_types );#endif /* __QETH_L3_H__ */
drivers/s390/net/qeth_l3_main.c +30 -14
63 lines not on this page · raw message
drivers/s390/net/qeth_l3_sys.c +10 -9
@@ -293,25 +293,26 @@ static ssize_t qeth_l3_dev_checksum_stor struct device_attribute *attr, const char *buf, size_t count) { struct qeth_card *card = dev_get_drvdata(dev); +enum qeth_checksum_types csum_type;char *tmp; +int rc;if (!card)return -EINVAL ; -if ((card->state !=CARD_STATE_DOWN ) && - (card->state !=CARD_STATE_RECOVER )) -return -EPERM ; - tmp =strsep ((char **) &buf,"\n" );if (!strcmp (tmp,"sw_checksumming" )) - card->options.checksum_type =SW_CHECKSUMMING ; + csum_type =SW_CHECKSUMMING ;else if (!strcmp (tmp,"hw_checksumming" )) - card->options.checksum_type =HW_CHECKSUMMING ; + csum_type =HW_CHECKSUMMING ;else if (!strcmp (tmp,"no_checksumming" )) - card->options.checksum_type =NO_CHECKSUMMING ; -else { + csum_type =NO_CHECKSUMMING ; +else return -EINVAL ; - } + + rc =qeth_l3_set_rx_csum (card, csum_type); +if (rc) +return rc;return count; }
David Miller
maintainerI'm still waiting for you to reimplement patch #4 with the TSO sysfs bits removed...