lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <1424925784.5565.147.camel@edumazet-glaptop2.roam.corp.google.com> Date: Wed, 25 Feb 2015 20:43:04 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: Eyal Birger <eyal.birger@...il.com> Cc: davem@...emloft.net, willemb@...gle.com, edumazet@...gle.com, shmulik.ladkani@...il.com, marcel@...tmann.org, netdev@...r.kernel.org Subject: Re: [PATCH net-next 6/7] net: add common accessor for setting dropcount on packets On Thu, 2015-02-26 at 04:10 +0200, Eyal Birger wrote: > As part of an effort to move skb->dropcount to skb->cb[], use > a common function in order to set dropcount in struct sk_buff. > > Signed-off-by: Eyal Birger <eyal.birger@...il.com> > --- > include/net/sock.h | 5 +++++ > net/core/sock.c | 2 +- > net/packet/af_packet.c | 2 +- > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/net/sock.h b/include/net/sock.h > index a2502d2..d462f5e 100644 > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -2081,6 +2081,11 @@ static inline int sock_intr_errno(long timeo) > #define sock_skb_cb_check_size(size) \ > BUILD_BUG_ON((size) > FIELD_SIZEOF(struct sk_buff, cb)) > > +static inline void sock_skb_set_dropcount(struct sock *sk, struct sk_buff *skb) const struct sock *sk > +{ > + skb->dropcount = atomic_read(&sk->sk_drops); > +} -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists