summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_l3.h
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>2018-03-09 20:13:00 +0300
committerDavid S. Miller <davem@davemloft.net>2018-03-09 21:10:05 +0300
commitd66b1c0df3f19812a6edb69fa35a1db01a2251d5 (patch)
tree6f26706088c62cb31736f82bf3569fdc989dbb8e /drivers/s390/net/qeth_l3.h
parent1b45c80be08d11e3f48c514a63d8c1214829fc19 (diff)
downloadlinux-d66b1c0df3f19812a6edb69fa35a1db01a2251d5.tar.xz
s390/qeth: restructure IP notification handlers
Extract a helper that does the actual work & returns the right NOTIFY_* responses, and start putting the temporary ipaddr container objects on the stack rather than kmalloc'ing them. They are small, and this reduces the confusion of which objects actually get added to qeth's IP tables. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l3.h')
-rw-r--r--drivers/s390/net/qeth_l3.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3.h b/drivers/s390/net/qeth_l3.h
index 498fe9af2cdb..cf834cdd0d2c 100644
--- a/drivers/s390/net/qeth_l3.h
+++ b/drivers/s390/net/qeth_l3.h
@@ -42,6 +42,16 @@ struct qeth_ipaddr {
} u;
};
+static inline void qeth_l3_init_ipaddr(struct qeth_ipaddr *addr,
+ enum qeth_ip_types type,
+ enum qeth_prot_versions proto)
+{
+ memset(addr, 0, sizeof(*addr));
+ addr->type = type;
+ addr->proto = proto;
+ addr->disp_flag = QETH_DISP_ADDR_DO_NOTHING;
+}
+
static inline bool qeth_l3_addr_match_ip(struct qeth_ipaddr *a1,
struct qeth_ipaddr *a2)
{