From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Karuna Grewal <karunagrewal98@gmail.com>
Cc: kbuild-all@01.org, pablo@netfilter.org, arturo@netfilter.org,
netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nft_meta: Extend support for NFT_META_TSTAMP_NS
Date: Mon, 4 Mar 2019 17:57:41 +0300 [thread overview]
Message-ID: <20190304145741.GB13452@kadam> (raw)
In-Reply-To: <20190301092401.GA17755@nebula>
Hi Karuna,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Karuna-Grewal/netfilter-nft_meta-Extend-support-for-NFT_META_TSTAMP_NS/20190301-182752
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
smatch warnings:
net/netfilter/nft_meta.c:261 nft_meta_get_eval() warn: right shifting more than type allows 32 vs 32
# https://github.com/0day-ci/linux/commit/02c5bd91b2cb1485eeb226b93c885aaa3f7a2a39
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 02c5bd91b2cb1485eeb226b93c885aaa3f7a2a39
vim +261 net/netfilter/nft_meta.c
0fb4d2195 wenxu 2019-01-16 247 case NFT_META_IIFKIND:
0fb4d2195 wenxu 2019-01-16 248 if (in == NULL || in->rtnl_link_ops == NULL)
0fb4d2195 wenxu 2019-01-16 249 goto err;
0fb4d2195 wenxu 2019-01-16 250 strncpy((char *)dest, in->rtnl_link_ops->kind, IFNAMSIZ);
0fb4d2195 wenxu 2019-01-16 251 break;
0fb4d2195 wenxu 2019-01-16 252 case NFT_META_OIFKIND:
0fb4d2195 wenxu 2019-01-16 253 if (out == NULL || out->rtnl_link_ops == NULL)
0fb4d2195 wenxu 2019-01-16 254 goto err;
0fb4d2195 wenxu 2019-01-16 255 strncpy((char *)dest, out->rtnl_link_ops->kind, IFNAMSIZ);
0fb4d2195 wenxu 2019-01-16 256 break;
02c5bd91b Karuna Grewal 2019-03-01 257 case NFT_META_TSTAMP_NS:
02c5bd91b Karuna Grewal 2019-03-01 258 if (skb->tstamp == 0)
02c5bd91b Karuna Grewal 2019-03-01 259 __net_timestamp((struct sk_buff *)skb);
02c5bd91b Karuna Grewal 2019-03-01 260 u64 timestamp = ktime_to_ns(skb->tstamp);
02c5bd91b Karuna Grewal 2019-03-01 @261 *dest = (u32) timestamp >> 32;
^^^^^^^^^^^^^^^
Missing parentheses. Generally, kernel style is to not put a space
after a cast, because casting is a high precedence operation.
02c5bd91b Karuna Grewal 2019-03-01 262 *(dest + 1) = (u32) timestamp;
02c5bd91b Karuna Grewal 2019-03-01 263 break;
96518518c Patrick McHardy 2013-10-14 264 default:
96518518c Patrick McHardy 2013-10-14 265 WARN_ON(1);
96518518c Patrick McHardy 2013-10-14 266 goto err;
96518518c Patrick McHardy 2013-10-14 267 }
96518518c Patrick McHardy 2013-10-14 268 return;
96518518c Patrick McHardy 2013-10-14 269
96518518c Patrick McHardy 2013-10-14 270 err:
a55e22e92 Patrick McHardy 2015-04-11 271 regs->verdict.code = NFT_BREAK;
96518518c Patrick McHardy 2013-10-14 272 }
96518518c Patrick McHardy 2013-10-14 273
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2019-03-04 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 9:24 [PATCH] netfilter: nft_meta: Extend support for NFT_META_TSTAMP_NS Karuna Grewal
2019-03-01 10:43 ` Karuna Grewal
2019-03-04 14:57 ` Dan Carpenter [this message]
2019-03-01 10:43 Karuna Grewal
2019-03-01 11:00 ` Florian Westphal
2019-03-05 8:23 ` Karuna Grewal
2019-03-05 10:12 ` Florian Westphal
2019-03-20 17:46 ` Karuna Grewal
2019-03-20 18:17 ` Karuna Grewal
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=20190304145741.GB13452@kadam \
--to=dan.carpenter@oracle.com \
--cc=arturo@netfilter.org \
--cc=karunagrewal98@gmail.com \
--cc=kbuild-all@01.org \
--cc=kbuild@01.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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).