blob: e8c6c3f0e98ca1b48fffa4494db92de324a3ace8 [file] [log] [blame]
Guvenc Gulcee8372d92020-12-01 20:20:43 +01001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
4 *
5 * SMC Generic netlink operations
6 *
7 * Copyright IBM Corp. 2020
8 *
9 * Author(s): Guvenc Gulce <guvenc@linux.ibm.com>
10 */
11
12#ifndef _SMC_NETLINK_H
13#define _SMC_NETLINK_H
14
15#include <net/netlink.h>
16#include <net/genetlink.h>
17
18extern struct genl_family smc_gen_nl_family;
19
Karsten Graulfa086662021-09-14 10:35:05 +020020extern const struct nla_policy smc_gen_ueid_policy[];
21
Guvenc Gulce099b9902020-12-01 20:20:44 +010022struct smc_nl_dmp_ctx {
Guvenc Gulcef0dd7bf2021-06-16 16:52:57 +020023 int pos[3];
Guvenc Gulce099b9902020-12-01 20:20:44 +010024};
25
26static inline struct smc_nl_dmp_ctx *smc_nl_dmp_ctx(struct netlink_callback *c)
27{
28 return (struct smc_nl_dmp_ctx *)c->ctx;
29}
30
Guvenc Gulcee8372d92020-12-01 20:20:43 +010031int smc_nl_init(void) __init;
32void smc_nl_exit(void);
33
34#endif