1. 05 11月, 2017 7 次提交
    • A
      dpaa_eth: avoid uninitialized variable false-positive warning · f21506cb
      Arnd Bergmann 提交于
      We can now build this driver on ARM, so I ran into a randconfig build
      warning that presumably had existed on powerpc already.
      
      drivers/net/ethernet/freescale/dpaa/dpaa_eth.c: In function 'sg_fd_to_skb':
      drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:1712:18: error: 'skb' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      I'm slightly changing the logic here, to make it obvious to the
      compiler that 'skb' is always initialized.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f21506cb
    • D
      Merge branch 'openvswitch-netns' · 727d5fbb
      David S. Miller 提交于
      Flavio Leitner says:
      
      ====================
      Allow openvswitch to query ports in another netns.
      
      Today Open vSwitch users are moving internal ports to other namespaces and
      although packets are flowing OK, the userspace daemon can't find out basic
      information like if the port is UP or DOWN, for instance.
      
      This patchset extends openvswitch API to retrieve the current netnsid of
      a port. It will be used by the userspace daemon to find out in which netns
      the port is located.
      
      This patchset also extends the rtnetlink getlink call to accept and operate
      on a given netnsid.  More details are available in each patch.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      727d5fbb
    • J
      rtnetlink: use netnsid to query interface · 79e1ad14
      Jiri Benc 提交于
      Currently, when an application gets netnsid from the kernel (for example as
      the result of RTM_GETLINK call on one end of the veth pair), it's not much
      useful. There's no reliable way to get to the netns fd from the netnsid, nor
      does any kernel API accept netnsid.
      
      Extend the RTM_GETLINK call to also accept netnsid. It will operate on the
      netns with the given netnsid in such case. Of course, the calling process
      needs to have enough capabilities in the target name space; for now, require
      CAP_NET_ADMIN. This can be relaxed in the future.
      
      To signal to the calling process that the kernel understood the new
      IFLA_IF_NETNSID attribute in the query, it will include it in the response.
      This is needed to detect older kernels, as they will just ignore
      IFLA_IF_NETNSID and query in the current name space.
      
      This patch implemetns IFLA_IF_NETNSID only for get and dump. For set
      operations, this can be extended later.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79e1ad14
    • J
      openvswitch: reliable interface indentification in port dumps · 9354d452
      Jiri Benc 提交于
      This patch allows reliable identification of netdevice interfaces connected
      to openvswitch bridges. In particular, user space queries the netdev
      interfaces belonging to the ports for statistics, up/down state, etc.
      Datapath dump needs to provide enough information for the user space to be
      able to do that.
      
      Currently, only interface names are returned. This is not sufficient, as
      openvswitch allows its ports to be in different name spaces and the
      interface name is valid only in its name space. What is needed and generally
      used in other netlink APIs, is the pair ifindex+netnsid.
      
      The solution is addition of the ifindex+netnsid pair (or only ifindex if in
      the same name space) to vport get/dump operation.
      
      On request side, ideally the ifindex+netnsid pair could be used to
      get/set/del the corresponding vport. This is not implemented by this patch
      and can be added later if needed.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9354d452
    • J
      net: export peernet2id_alloc · 7cbebc8a
      Jiri Benc 提交于
      It will be used by openvswitch.
      Signed-off-by: NJiri Benc <jbenc@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cbebc8a
    • E
      ipv6: remove IN6_ADDR_HSIZE from addrconf.h · 27c565ae
      Eric Dumazet 提交于
      IN6_ADDR_HSIZE is private to addrconf.c, move it here to avoid
      confusion.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27c565ae
    • E
      pktgen: do not abuse IN6_ADDR_HSIZE · df7e8e2e
      Eric Dumazet 提交于
      pktgen accidentally used IN6_ADDR_HSIZE, instead of using the size of an
      IPv6 address.
      
      Since IN6_ADDR_HSIZE recently was increased from 16 to 256, this old
      bug is hitting us.
      
      Fixes: 3f27fb23 ("ipv6: addrconf: add per netns perturbation in inet6_addr_hash()")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df7e8e2e
  2. 04 11月, 2017 33 次提交