From: kernel test robot <lkp@intel.com>
To: Antonio Quartulli <antonio@openvpn.net>, netdev@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Jakub Kicinski <kuba@kernel.org>,
Sergey Ryazanov <ryazanov.s.a@gmail.com>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Antonio Quartulli <antonio@openvpn.net>
Subject: Re: [PATCH net-next v2 03/22] ovpn: add basic netlink support
Date: Tue, 5 Mar 2024 18:49:49 +0800 [thread overview]
Message-ID: <202403051838.YHYbFiGD-lkp@intel.com> (raw)
In-Reply-To: <20240304150914.11444-4-antonio@openvpn.net>
Hi Antonio,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Antonio-Quartulli/netlink-add-NLA_POLICY_MAX_LEN-macro/20240304-232835
base: net-next/main
patch link: https://lore.kernel.org/r/20240304150914.11444-4-antonio%40openvpn.net
patch subject: [PATCH net-next v2 03/22] ovpn: add basic netlink support
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240305/202403051838.YHYbFiGD-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403051838.YHYbFiGD-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403051838.YHYbFiGD-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ovpn/netlink.c:82: warning: Function parameter or struct member 'net' not described in 'ovpn_get_dev_from_attrs'
>> drivers/net/ovpn/netlink.c:82: warning: Function parameter or struct member 'attrs' not described in 'ovpn_get_dev_from_attrs'
>> drivers/net/ovpn/netlink.c:181: warning: Function parameter or struct member 'nb' not described in 'ovpn_nl_notify'
>> drivers/net/ovpn/netlink.c:181: warning: Function parameter or struct member 'state' not described in 'ovpn_nl_notify'
>> drivers/net/ovpn/netlink.c:181: warning: Function parameter or struct member '_notify' not described in 'ovpn_nl_notify'
>> drivers/net/ovpn/netlink.c:193: warning: Function parameter or struct member 'ovpn' not described in 'ovpn_nl_init'
vim +82 drivers/net/ovpn/netlink.c
76
77 /**
78 * ovpn_get_dev_from_attrs() - retrieve the netdevice a netlink message is targeting
79 */
80 static struct net_device *
81 ovpn_get_dev_from_attrs(struct net *net, struct nlattr **attrs)
> 82 {
83 struct net_device *dev;
84 int ifindex;
85
86 if (!attrs[OVPN_A_IFINDEX])
87 return ERR_PTR(-EINVAL);
88
89 ifindex = nla_get_u32(attrs[OVPN_A_IFINDEX]);
90
91 dev = dev_get_by_index(net, ifindex);
92 if (!dev)
93 return ERR_PTR(-ENODEV);
94
95 if (!ovpn_dev_is_valid(dev))
96 goto err_put_dev;
97
98 return dev;
99
100 err_put_dev:
101 dev_put(dev);
102
103 return ERR_PTR(-EINVAL);
104 }
105
106 /**
107 * ovpn_pre_doit() - Prepare ovpn genl doit request
108 * @ops: requested netlink operation
109 * @skb: Netlink message with request data
110 * @info: receiver information
111 *
112 * Return: 0 on success or negative error number in case of failure
113 */
114 static int ovpn_pre_doit(const struct genl_split_ops *ops, struct sk_buff *skb,
115 struct genl_info *info)
116 {
117 struct net *net = genl_info_net(info);
118 struct net_device *dev;
119
120 /* the OVPN_CMD_NEW_IFACE command is different from the rest as it
121 * just expects an IFNAME, while all the others expect an IFINDEX
122 */
123 if (info->genlhdr->cmd == OVPN_CMD_NEW_IFACE) {
124 if (!info->attrs[OVPN_A_IFNAME]) {
125 GENL_SET_ERR_MSG(info, "no interface name specified");
126 return -EINVAL;
127 }
128 return 0;
129 }
130
131 dev = ovpn_get_dev_from_attrs(net, info->attrs);
132 if (IS_ERR(dev))
133 return PTR_ERR(dev);
134
135 info->user_ptr[0] = netdev_priv(dev);
136
137 return 0;
138 }
139
140 /**
141 * ovpn_post_doit() - complete ovpn genl doit request
142 * @ops: requested netlink operation
143 * @skb: Netlink message with request data
144 * @info: receiver information
145 */
146 static void ovpn_post_doit(const struct genl_split_ops *ops, struct sk_buff *skb,
147 struct genl_info *info)
148 {
149 struct ovpn_struct *ovpn;
150
151 ovpn = info->user_ptr[0];
152 /* in case of OVPN_CMD_NEW_IFACE, there is no pre-stored device */
153 if (ovpn)
154 dev_put(ovpn->dev);
155 }
156
157 static const struct genl_small_ops ovpn_nl_ops[] = {
158 };
159
160 static struct genl_family ovpn_nl_family __ro_after_init = {
161 .hdrsize = 0,
162 .name = OVPN_NL_NAME,
163 .version = 1,
164 .maxattr = NUM_OVPN_A + 1,
165 .policy = ovpn_nl_policy,
166 .netnsok = true,
167 .pre_doit = ovpn_pre_doit,
168 .post_doit = ovpn_post_doit,
169 .module = THIS_MODULE,
170 .small_ops = ovpn_nl_ops,
171 .n_small_ops = ARRAY_SIZE(ovpn_nl_ops),
172 .mcgrps = ovpn_nl_mcgrps,
173 .n_mcgrps = ARRAY_SIZE(ovpn_nl_mcgrps),
174 };
175
176 /**
177 * ovpn_nl_notify() - react to openvpn userspace process exit
178 */
179 static int ovpn_nl_notify(struct notifier_block *nb, unsigned long state,
180 void *_notify)
> 181 {
182 return NOTIFY_DONE;
183 }
184
185 static struct notifier_block ovpn_nl_notifier = {
186 .notifier_call = ovpn_nl_notify,
187 };
188
189 /**
190 * ovpn_nl_init() - perform any ovpn specific netlink initialization
191 */
192 int ovpn_nl_init(struct ovpn_struct *ovpn)
> 193 {
194 return 0;
195 }
196
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-03-05 10:50 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 15:08 [PATCH net-next v2 00/22] Introducing OpenVPN Data Channel Offload Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 01/22] netlink: add NLA_POLICY_MAX_LEN macro Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 02/22] net: introduce OpenVPN Data Channel Offload (ovpn) Antonio Quartulli
2024-03-04 20:47 ` Andrew Lunn
2024-03-04 21:30 ` Antonio Quartulli
2024-03-04 22:46 ` Andrew Lunn
2024-03-05 12:29 ` Antonio Quartulli
2024-03-06 15:51 ` Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 03/22] ovpn: add basic netlink support Antonio Quartulli
2024-03-04 21:20 ` Andrew Lunn
2024-03-05 15:47 ` Antonio Quartulli
2024-03-05 16:23 ` Andrew Lunn
2024-03-05 19:39 ` Jakub Kicinski
2024-03-06 14:46 ` Antonio Quartulli
2024-03-06 19:10 ` Andrew Lunn
2024-03-08 0:01 ` Antonio Quartulli
2024-03-05 10:49 ` kernel test robot [this message]
2024-03-26 11:43 ` Esben Haabendal
2024-03-26 21:39 ` Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 04/22] ovpn: add basic interface creation/destruction/management routines Antonio Quartulli
2024-03-04 21:33 ` Andrew Lunn
2024-03-05 15:51 ` Antonio Quartulli
2024-03-05 16:27 ` Andrew Lunn
2024-03-06 14:49 ` Antonio Quartulli
2024-03-06 19:31 ` Andrew Lunn
2024-03-08 0:08 ` Antonio Quartulli
2024-03-08 13:13 ` Andrew Lunn
2024-03-08 14:21 ` Antonio Quartulli
2024-03-05 19:40 ` Jakub Kicinski
2024-03-06 14:59 ` Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 05/22] ovpn: implement interface creation/destruction via netlink Antonio Quartulli
2024-03-05 14:51 ` Simon Horman
2024-03-06 15:01 ` Antonio Quartulli
2024-03-25 15:01 ` Esben Haabendal
2024-03-26 21:44 ` Antonio Quartulli
2024-04-02 6:48 ` Esben Haabendal
2024-03-04 15:08 ` [PATCH net-next v2 06/22] ovpn: introduce the ovpn_peer object Antonio Quartulli
2024-03-04 21:52 ` Andrew Lunn
2024-03-05 15:52 ` Antonio Quartulli
2024-03-04 22:56 ` Andrew Lunn
2024-03-06 16:03 ` Antonio Quartulli
2024-03-06 19:23 ` Andrew Lunn
2024-03-08 0:12 ` Antonio Quartulli
2024-03-08 2:04 ` Andrew Lunn
2024-03-08 11:00 ` Antonio Quartulli
2024-03-26 10:34 ` Esben Haabendal
2024-03-26 21:45 ` Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 07/22] ovpn: introduce the ovpn_socket object Antonio Quartulli
2024-03-05 14:59 ` Simon Horman
2024-03-06 15:08 ` Antonio Quartulli
2024-03-04 15:08 ` [PATCH net-next v2 08/22] ovpn: implement basic TX path (UDP) Antonio Quartulli
2024-03-05 19:47 ` Jakub Kicinski
2024-03-06 15:18 ` Antonio Quartulli
2024-03-08 15:31 ` Toke Høiland-Jørgensen
2024-03-08 15:44 ` Antonio Quartulli
2024-03-11 15:19 ` Toke Høiland-Jørgensen
2024-03-11 16:28 ` Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 09/22] ovpn: implement basic RX " Antonio Quartulli
2024-03-05 15:04 ` Simon Horman
2024-03-06 15:29 ` Antonio Quartulli
2024-03-08 2:17 ` Andrew Lunn
2024-03-08 11:07 ` Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 10/22] ovpn: implement packet processing Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 11/22] ovpn: store tunnel and transport statistics Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 12/22] ovpn: implement TCP transport Antonio Quartulli
2024-03-05 15:12 ` Simon Horman
2024-03-06 15:31 ` Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 13/22] ovpn: implement multi-peer support Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 14/22] ovpn: implement peer lookup logic Antonio Quartulli
2024-03-05 15:16 ` Simon Horman
2024-03-06 15:33 ` Antonio Quartulli
2024-03-06 0:11 ` kernel test robot
2024-03-09 10:16 ` kernel test robot
2024-03-04 15:09 ` [PATCH net-next v2 15/22] ovpn: implement keepalive mechanism Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 16/22] ovpn: add support for updating local UDP endpoint Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 17/22] ovpn: add support for peer floating Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 18/22] ovpn: implement peer add/dump/delete via netlink Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 19/22] ovpn: implement key add/del/swap " Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 20/22] ovpn: kill key and notify userspace in case of IV exhaustion Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 21/22] ovpn: notify userspace when a peer is deleted Antonio Quartulli
2024-03-04 15:09 ` [PATCH net-next v2 22/22] ovpn: add basic ethtool support Antonio Quartulli
2024-03-04 23:04 ` Andrew Lunn
2024-03-06 15:42 ` Antonio Quartulli
2024-03-06 19:40 ` Andrew Lunn
2024-03-08 0:21 ` Antonio Quartulli
2024-03-04 21:07 ` [PATCH net-next v2 00/22] Introducing OpenVPN Data Channel Offload Sergey Ryazanov
2024-03-05 19:30 ` Jakub Kicinski
2024-03-06 15:44 ` Antonio Quartulli
2024-03-06 16:13 ` Jakub Kicinski
2024-03-08 0:21 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202403051838.YHYbFiGD-lkp@intel.com \
--to=lkp@intel.com \
--cc=antonio@openvpn.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=ryazanov.s.a@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).