提交 a6bcf1c1 编写于 作者: C Cyrill Gorcunov 提交者: David S. Miller

net: pppoe - introduce net-namespace functionality

- each net-namespace for pppoe module is having own
  hash table and appropriate locks wich are allocated
  at time of namespace intialization. It requires about
  140 bytes of memory for every new namespace but such
  approach allow us to escape from hash chains growing
  and additional lock contends (especially in SMP environment).

- pppox code allows to create per-namespace sockets for
  PX_PROTO_OE protocol only (since at this moment support
  for pppol2tp net-namespace is not implemented yet).
Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6aba9158
此差异已折叠。
......@@ -108,12 +108,13 @@ static int pppox_create(struct net *net, struct socket *sock, int protocol)
{
int rc = -EPROTOTYPE;
if (net != &init_net)
return -EAFNOSUPPORT;
if (protocol < 0 || protocol > PX_MAX_PROTO)
goto out;
/* we support net-namespaces for PPPoE only (yet) */
if (protocol != PX_PROTO_OE && net != &init_net)
return -EAFNOSUPPORT;
rc = -EPROTONOSUPPORT;
if (!pppox_protos[protocol])
request_module("pppox-proto-%d", protocol);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册