summaryrefslogtreecommitdiff
path: root/net/l2tp/l2tp_ppp.c
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2020-07-22 18:57:11 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-22 18:06:08 -0700
commit637989b5d77e954007aecaf6cadc7badc6ab94fb (patch)
tree2448cd8b05ab02b0bb380e66a819b77e76f72c2e /net/l2tp/l2tp_ppp.c
parentfdd8fac47ce67bae17feed9b74b3505e432fe561 (diff)
devlink: Always use user_ptr[0] for devlink and simplify post_doit
Currently devlink instance is searched on all doit() operations. But it is optionally stored into user_ptr[0]. This requires rediscovering devlink again doing post_doit(). Few devlink commands related to port shared buffers needs 3 pointers (devlink, devlink_port, and devlink_sb) while executing doit commands. Though devlink pointer can be derived from the devlink_port during post_doit() operation when doit() callback has acquired devlink instance lock, relying on such scheme to access devlik pointer makes code very fragile. Hence, to avoid ambiguity in post_doit() and to avoid searching devlink instance again, simplify code by always storing devlink instance in user_ptr[0] and derive devlink_sb pointer in their respective callback routines. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_ppp.c')
0 files changed, 0 insertions, 0 deletions