From: David Ahern <dsahern@gmail.com>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next] Revert "ipv4: make net_protocol const"
Date: Tue, 29 Aug 2017 10:47:15 -0600 [thread overview]
Message-ID: <55ee348e-3193-f384-b4a9-3f773052a154@gmail.com> (raw)
In-Reply-To: <CAOH+1jF3G+Yo30Tk=cgnAPfD8UNe+FkkLjC1uGUd9eeG-ce5KA@mail.gmail.com>
On 8/29/17 12:46 AM, Bhumika Goyal wrote:
> I am compile testing them. In this case I did: make
> net/ipv4/af_inet.o and it compiled. Is this error because of
> typecasting net_protocol inside inet_add_protocol function?
Compile testing is not sufficient. Marking data structures read-only
leaves potential land mines for others to trip over at run-time.
You are making these changes based on a code analysis. Extend the
analysis to elements of the structure. In this case early_demux is the
first element. There are only 9 references to early_demux and cscope
very quickly tells you it can be changed:
7 sysctl_net_ipv4.c proc_configure_early_demux 312 ipprot->early_demux
= enabled ? ipprot->early_demux_handler :
8 sysctl_net_ipv4.c proc_configure_early_demux 318 ip6prot->early_demux
= enabled ? ip6prot->early_demux_handler :
prev parent reply other threads:[~2017-08-29 16:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 20:23 [PATCH net-next] Revert "ipv4: make net_protocol const" David Ahern
2017-08-28 21:01 ` David Miller
2017-08-28 21:03 ` David Ahern
2017-08-28 21:30 ` David Miller
2017-08-28 21:18 ` Stephen Hemminger
2017-08-29 6:46 ` Bhumika Goyal
2017-08-29 15:14 ` Stephen Hemminger
2017-08-29 16:47 ` David Ahern [this message]
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=55ee348e-3193-f384-b4a9-3f773052a154@gmail.com \
--to=dsahern@gmail.com \
--cc=bhumirks@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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).