aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3.h
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.vnet.ibm.com>2018-03-09 18:13:00 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-09 13:10:05 -0500
commitd66b1c0df3f19812a6edb69fa35a1db01a2251d5 (patch)
tree6f26706088c62cb31736f82bf3569fdc989dbb8e /drivers/s390/net/qeth_l3.h
parents390/qeth: reset NAPI context during queue init (diff)
downloadlinux-dev-d66b1c0df3f19812a6edb69fa35a1db01a2251d5.tar.xz
linux-dev-d66b1c0df3f19812a6edb69fa35a1db01a2251d5.zip
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)
{