/* * u_ncm.h * * Utility definitions for the ncm function * * Copyright (c) 2013 Samsung Electronics Co., Ltd. * http://www.samsung.com * * Author: Andrzej Pietrasiewicz * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef U_NCM_H #define U_NCM_H #include struct f_ncm_opts { struct usb_function_instance func_inst; struct net_device *net; bool bound; /* * Read/write access to configfs attributes is handled by configfs. * * This is to protect the data from concurrent access by read/write * and create symlink/remove symlink. */ struct mutex lock; int refcnt; }; #endif /* U_NCM_H */ dex : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-01-09 10:29:27 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-09 17:07:54 -0500
commitb369e7fd41f7cdbe2488cb736ef4f958bb94b5e2 (patch)
treeb37e5e194ed9232bdd2a4539d9630a1f8b5d08ee /net/netlink/af_netlink.c
parentc22e5c125b7a00fdd177e0caba4f432eb66c8a73 (diff)
tcp: make TCP_INFO more consistent
tcp_get_info() has to lock the socket, so lets lock it for an extended critical section, so that various fields have consistent values. This solves an annoying issue that some applications reported when multiple counters are updated during one particular rx/rx event, and TCP_INFO was called from another cpu. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.c')