<div dir="ltr"><div>Hi,</div><div><br></div><div>Could anyone review this change?</div><div>This is the same one I sent in February except the prefix of commit message(net: => gtp:).<br></div><div><br></div><div>BR,</div><div>Yoshiyuki<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 22, 2020 at 11:42 PM Yoshiyuki Kurauchi <<a href="mailto:ahochauwaaaaa@gmail.com">ahochauwaaaaa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In drivers/net/gtp.c, gtp_genl_dump_pdp() should set NLM_F_MULTI<br>
flag since it returns multipart message.<br>
This patch adds a new arg "flags" in gtp_genl_fill_info() so that<br>
flags can be set by the callers.<br>
<br>
Signed-off-by: Yoshiyuki Kurauchi <<a href="mailto:ahochauwaaaaa@gmail.com" target="_blank">ahochauwaaaaa@gmail.com</a>><br>
---<br>
 drivers/net/gtp.c | 11 ++++++-----<br>
 1 file changed, 6 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c<br>
index 672cd2caf2fb..10fa731bae6d 100644<br>
--- a/drivers/net/gtp.c<br>
+++ b/drivers/net/gtp.c<br>
@@ -1097,7 +1097,7 @@ static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)<br>
 }<br>
<br>
 static struct pdp_ctx *gtp_find_pdp_by_link(struct net *net,<br>
-                                           struct nlattr *nla[])<br>
+                                               struct nlattr *nla[])<br>
 {<br>
        struct gtp_dev *gtp;<br>
<br>
@@ -1169,11 +1169,11 @@ static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info)<br>
 static struct genl_family gtp_genl_family;<br>
<br>
 static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq,<br>
-                             u32 type, struct pdp_ctx *pctx)<br>
+                             int flags, u32 type, struct pdp_ctx *pctx)<br>
 {<br>
        void *genlh;<br>
<br>
-       genlh = genlmsg_put(skb, snd_portid, snd_seq, &gtp_genl_family, 0,<br>
+       genlh = genlmsg_put(skb, snd_portid, snd_seq, &gtp_genl_family, flags,<br>
                            type);<br>
        if (genlh == NULL)<br>
                goto nlmsg_failure;<br>
@@ -1227,8 +1227,8 @@ static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info)<br>
                goto err_unlock;<br>
        }<br>
<br>
-       err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid,<br>
-                                info->snd_seq, info->nlhdr->nlmsg_type, pctx);<br>
+       err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, info->snd_seq,<br>
+                               info->nlhdr->nlmsg_flags, info->nlhdr->nlmsg_type, pctx);<br>
        if (err < 0)<br>
                goto err_unlock_free;<br>
<br>
@@ -1271,6 +1271,7 @@ static int gtp_genl_dump_pdp(struct sk_buff *skb,<br>
                                    gtp_genl_fill_info(skb,<br>
                                            NETLINK_CB(cb->skb).portid,<br>
                                            cb->nlh->nlmsg_seq,<br>
+                                           NLM_F_MULTI,<br>
                                            cb->nlh->nlmsg_type, pctx)) {<br>
                                        cb->args[0] = i;<br>
                                        cb->args[1] = j;<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>