Patch "s390/qeth: update takeover IPs after configuration change" has been added to the 4.14-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
s390/qeth: update takeover IPs after configuration change
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
s390-qeth-update-takeover-ips-after-configuration-change.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Dec 31 11:12:48 CET 2017
From: Julian Wiedmann <[email protected]>
Date: Wed, 13 Dec 2017 18:56:32 +0100
Subject: s390/qeth: update takeover IPs after configuration change
From: Julian Wiedmann <[email protected]>
[ Upstream commit 02f510f326501470348a5df341e8232c3497bbbb ]
Any modification to the takeover IP-ranges requires that we re-evaluate which IP addresses are takeover-eligible. Otherwise we might do takeover for some addresses when we no longer should, or vice-versa.
--- drivers/s390/net/qeth_core.h | 4 +- drivers/s390/net/qeth_core_main.c | 4 +- drivers/s390/net/qeth_l3.h | 2 - drivers/s390/net/qeth_l3_main.c | 31 ++++++++++++++++-- drivers/s390/net/qeth_l3_sys.c | 63 ++++++++++++++++++++------------------ 5 files changed, 67 insertions(+), 37 deletions(-)
drivers/s390/net/qeth_core.h +2 -2
@@ -565,8 +565,8 @@ enum qeth_cq {struct qeth_ipato {bool enabled; -int invert4; -int invert6; +bool invert4; +bool invert6;struct list_head entries; };
drivers/s390/net/qeth_core_main.c +2 -2
@@ -1480,8 +1480,8 @@ static int qeth_setup_card(struct qeth_c/* IP address takeover */ INIT_LIST_HEAD (&card->ipato.entries); card->ipato.enabled = false; - card->ipato.invert4 =0 ; - card->ipato.invert6 =0 ; + card->ipato.invert4 = false; + card->ipato.invert6 = false;/* init QDIO stuff */ qeth_init_qdio_info (card);INIT_DELAYED_WORK (&card->buffer_reclaim_work, qeth_buffer_reclaim_work);
drivers/s390/net/qeth_l3.h +1 -1
@@ -82,7 +82,7 @@ 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_is_addr_covered_by_ipato (struct qeth_card *,struct qeth_ipaddr *); +void qeth_l3_update_ipato (struct qeth_card *card);struct qeth_ipaddr *qeth_l3_get_addr_buffer (enum qeth_prot_versions );int qeth_l3_add_ip (struct qeth_card *,struct qeth_ipaddr *);int qeth_l3_delete_ip (struct qeth_card *,struct qeth_ipaddr *);
drivers/s390/net/qeth_l3_main.c +28 -3
@@ -163,8 +163,8 @@ static void qeth_l3_convert_addr_to_bits } } -int qeth_l3_is_addr_covered_by_ipato (struct qeth_card *card, -struct qeth_ipaddr *addr) +static bool qeth_l3_is_addr_covered_by_ipato (struct qeth_card *card, +struct qeth_ipaddr *addr) {struct qeth_ipato_entry *ipatoe;u8 addr_bits[128 ] = {0 , };
@@ -605,6 +605,27 @@ int qeth_l3_setrouting_v6(struct qeth_ca/* * IP address takeover related functions */ + +/** +* qeth_l3_update_ipato() - Update 'takeover' property, for all NORMAL IPs. +* +* Caller must hold ip_lock. +*/ +void qeth_l3_update_ipato (struct qeth_card *card) +{ +struct qeth_ipaddr *addr; +unsigned int i; + +hash_for_each (card->ip_htable, i, addr, hnode) { +if (addr->type !=QETH_IP_TYPE_NORMAL ) +continue ; +if (qeth_l3_is_addr_covered_by_ipato (card, addr)) + addr->set_flags |=QETH_IPA_SETIP_TAKEOVER_FLAG ; +else + addr->set_flags &= ~QETH_IPA_SETIP_TAKEOVER_FLAG ; + } +} +static void qeth_l3_clear_ipato_list (struct qeth_card *card) {struct qeth_ipato_entry *ipatoe, *tmp;
@@ -616,6 +637,7 @@ static void qeth_l3_clear_ipato_list(strkfree (ipatoe); } +qeth_l3_update_ipato (card);spin_unlock_bh (&card->ip_lock); }
@@ -640,8 +662,10 @@ int qeth_l3_add_ipato_entry(struct qeth_ } } -if (!rc) +if (!rc) {list_add_tail (&new->entry, &card->ipato.entries); +qeth_l3_update_ipato (card); + }spin_unlock_bh (&card->ip_lock);
@@ -664,6 +688,7 @@ void qeth_l3_del_ipato_entry(struct qeth (proto == QETH_PROT_IPV4)? 4:16) && (ipatoe->mask_bits == mask_bits)) {list_del (&ipatoe->entry); +qeth_l3_update_ipato (card);kfree (ipatoe); } }
drivers/s390/net/qeth_l3_sys.c +34 -29
103 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/s390-qeth-lock-ip-table-while-applying-takeover-changes.patch queue-4.14/s390-qeth-fix-error-handling-in-checksum-cmd-callback.patch queue-4.14/s390-qeth-apply-takeover-changes-when-mode-is-toggled.patch queue-4.14/s390-qeth-update-takeover-ips-after-configuration-change.patch queue-4.14/s390-qeth-don-t-apply-takeover-changes-to-rxip.patch