gtp: misc improvements

Submitted by Andreas Schultz on Feb. 13, 2017, 3:36 p.m.


Reviewer None
Submitted Feb. 13, 2017, 3:36 p.m.
Last Updated March 9, 2017, 4:44 p.m.
Revision 3

Cover Letter

Hi Pablo,

This is a resent of last series that missed the merge window. There
are no changes compared to v4.

v4: Compared to v3 it contains mostly smallish naming and spelling fixes.
It also drops the documentation patch, Harald did a better job with the
documentation and the some things I described do not yet match the implementation.
I'll readd the relevant parts with a follow up series.

This series lays the groundwork for removing the socket references from
the GTP netdevice by removing duplicate code and simplifying the logic on
some code paths.

It slighly changes the GTP genl API by making the socket parameters optional
(though one of them is still required).

The removal of the socket references will break the 1:1 releation between
GTP netdevice and GTP socket that prevents us to support multiple VRFs with
overlapping IP addresse spaces attached to the same GTP-U entity (needed for
multi APN support, coming a follow up series).

Pablo found a socket hold problem in v2. In order to solve that I had to
switch the socket references from the struct socket to the internal
struct sock. This should have no functionl impact, but we can now hang
on to the reference without blocking user space from closing the GTP socket.

 * resent for new merge window
 * drop the documentation patch
 * spelling fixes
 * pass nlattr instead of genl_info into gtp_find_dev,
   makes the code slightly more compact and readable
 * add documentation to explain the goal of all these changes
 * incorporate review comments
 * switch from struct socket to struct sock


Andreas Schultz (7):
  gtp: switch from struct socket to struct sock for the GTP sockets
  gtp: make GTP sockets in gtp_newlink optional
  gtp: merge gtp_get_net and gtp_genl_find_dev
  gtp: consolidate gtp socket rx path
  gtp: unify genl_find_pdp and prepare for per socket lookup
  gtp: consolidate pdp context destruction into helper
  gtp: add socket to pdp context

 drivers/net/gtp.c | 543 +++++++++++++++++++++++++++---------------------------
 1 file changed, 269 insertions(+), 274 deletions(-)