From: Sergey Popovich <popovich_sergei@mail.ru>
To: netdev@vger.kernel.org
Subject: [PATCH 3/4] ipv4: use SNMP macro assuming softirq context in ip_forward().
Date: Tue, 21 Jan 2014 13:48:50 +0200 [thread overview]
Message-ID: <3c324aaf986e6d5a0678cac6d292dd0b96bd9766.1390304505.git.popovich_sergei@mail.ru> (raw)
In-Reply-To: <cover.1390304505.git.popovich_sergei@mail.ru>
In-Reply-To: <cover.1390304505.git.popovich_sergei@mail.ru>
ip_forward() runs entirely in softirq context, we could use
version of SNMP macro which updates stats counters assuming that.
Signed-off-by: Sergey Popovich <popovich_sergei@mail.ru>
---
net/ipv4/ip_forward.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index e9f1217..fd7eeec 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -93,7 +93,7 @@ int ip_forward(struct sk_buff *skb)
mtu = ip_dst_mtu_maybe_forward(&rt->dst, true);
if (unlikely(skb->len > mtu && !skb_is_gso(skb) &&
(ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
- IP_INC_STATS(dev_net(rt->dst.dev), IPSTATS_MIB_FRAGFAILS);
+ IP_INC_STATS_BH(dev_net(rt->dst.dev), IPSTATS_MIB_FRAGFAILS);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
htonl(mtu));
goto drop;
--
1.8.3.4
next prev parent reply other threads:[~2014-01-21 11:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 11:48 [PATCH 0/4] ipv4: small set of fixes Sergey Popovich
2014-01-21 11:48 ` [PATCH 1/4] ipv4: don't disable interface if last ipv4 address is removed Sergey Popovich
2014-01-23 1:52 ` David Miller
2014-01-21 11:48 ` [PATCH 2/4] ipv4: fib_semantics: increment fib_info_cnt after fib_info allocation Sergey Popovich
2014-01-21 11:48 ` Sergey Popovich [this message]
2014-01-23 1:52 ` [PATCH 3/4] ipv4: use SNMP macro assuming softirq context in ip_forward() David Miller
2014-01-21 11:48 ` [PATCH 4/4] ipv4: mark nexthop as dead when it's subnet becomes unreachable Sergey Popovich
2014-01-23 1:53 ` David Miller
2014-01-23 10:06 ` Julian Anastasov
2014-01-23 15:05 ` Sergey Popovich
2014-01-23 21:58 ` Julian Anastasov
2014-01-24 10:12 ` Sergey Popovich
2014-01-24 10:25 ` [PATCH 4/4 v3] " Sergey Popovich
2014-01-24 21:49 ` Julian Anastasov
2014-01-24 10:15 ` [PATCH 4/4 v3] ipv4: mark nexthop as dead when it's subnet becomes Sergey Popovich
2014-01-24 10:26 ` Sergey Popovich
2014-01-23 1:54 ` [PATCH 0/4] ipv4: small set of fixes David Miller
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=3c324aaf986e6d5a0678cac6d292dd0b96bd9766.1390304505.git.popovich_sergei@mail.ru \
--to=popovich_sergei@mail.ru \
--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).