1. 21 7月, 2016 1 次提交
  2. 20 7月, 2016 11 次提交
    • B
      rtnl: add option for setting link xdp prog · d1fdd913
      Brenden Blanco 提交于
      Sets the bpf program represented by fd as an early filter in the rx path
      of the netdev. The fd must have been created as BPF_PROG_TYPE_XDP.
      Providing a negative value as fd clears the program. Getting the fd back
      via rtnl is not possible, therefore reading of this value merely
      provides a bool whether the program is valid on the link or not.
      Signed-off-by: NBrenden Blanco <bblanco@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1fdd913
    • B
      net: add ndo to setup/query xdp prog in adapter rx · a7862b45
      Brenden Blanco 提交于
      Add one new netdev op for drivers implementing the BPF_PROG_TYPE_XDP
      filter. The single op is used for both setup/query of the xdp program,
      modelled after ndo_setup_tc.
      Signed-off-by: NBrenden Blanco <bblanco@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7862b45
    • B
      bpf: add XDP prog type for early driver filter · 6a773a15
      Brenden Blanco 提交于
      Add a new bpf prog type that is intended to run in early stages of the
      packet rx path. Only minimal packet metadata will be available, hence a
      new context type, struct xdp_md, is exposed to userspace. So far only
      expose the packet start and end pointers, and only in read mode.
      
      An XDP program must return one of the well known enum values, all other
      return codes are reserved for future use. Unfortunately, this
      restriction is hard to enforce at verification time, so take the
      approach of warning at runtime when such programs are encountered. Out
      of bounds return codes should alias to XDP_ABORTED.
      Signed-off-by: NBrenden Blanco <bblanco@plumgrid.com>
      Acked-by: NAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a773a15
    • G
      net/ncsi: NCSI AEN packet handler · 7a82ecf4
      Gavin Shan 提交于
      This introduces NCSI AEN packet handlers that result in (A) the
      currently active channel is reconfigured; (B) Currently active
      channel is deconfigured and disabled, another channel is chosen
      as active one and configured. Case (B) won't happen if hardware
      arbitration has been enabled, the channel that was in active
      state is suspended simply.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a82ecf4
    • G
      net/ncsi: Package and channel management · e6f44ed6
      Gavin Shan 提交于
      This manages NCSI packages and channels:
      
       * The available packages and channels are enumerated in the first
         time of calling ncsi_start_dev(). The channels' capabilities are
         probed in the meanwhile. The NCSI network topology won't change
         until the NCSI device is destroyed.
       * There in a queue in every NCSI device. The element in the queue,
         channel, is waiting for configuration (bringup) or suspending
         (teardown). The channel's state (inactive/active) indicates the
         futher action (configuration or suspending) will be applied on the
         channel. Another channel's state (invisible) means the requested
         action is being applied.
       * The hardware arbitration will be enabled if all available packages
         and channels support it. All available channels try to provide
         service when hardware arbitration is enabled. Otherwise, one channel
         is selected as the active one at once.
       * When channel is in active state, meaning it's providing service, a
         timer started to retrieve the channe's link status. If the channel's
         link status fails to be updated in the determined period, the channel
         is going to be reconfigured. It's the error handling implementation
         as defined in NCSI spec.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6f44ed6
    • G
      net/ncsi: NCSI response packet handler · 138635cc
      Gavin Shan 提交于
      The NCSI response packets are sent to MC (Management Controller)
      from the remote end. They are responses of NCSI command packets
      for multiple purposes: completion status of NCSI command packets,
      return NCSI channel's capability or configuration etc.
      
      This defines struct to represent NCSI response packets and introduces
      function ncsi_rcv_rsp() which will be used to receive NCSI response
      packets and parse them.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      138635cc
    • G
      net/ncsi: NCSI command packet handler · 6389eaa7
      Gavin Shan 提交于
      The NCSI command packets are sent from MC (Management Controller)
      to remote end. They are used for multiple purposes: probe existing
      NCSI package/channel, retrieve NCSI channel's capability, configure
      NCSI channel etc.
      
      This defines struct to represent NCSI command packets and introduces
      function ncsi_xmit_cmd(), which will be used to transmit NCSI command
      packet according to the request. The request is represented by struct
      ncsi_cmd_arg.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6389eaa7
    • G
      net/ncsi: Resource management · 2d283bdd
      Gavin Shan 提交于
      NCSI spec (DSP0222) defines several objects: package, channel, mode,
      filter, version and statistics etc. This introduces the data structs
      to represent those objects and implement functions to manage them.
      Also, this introduces CONFIG_NET_NCSI for the newly implemented NCSI
      stack.
      
         * The user (e.g. netdev driver) dereference NCSI device by
           "struct ncsi_dev", which is embedded to "struct ncsi_dev_priv".
           The later one is used by NCSI stack internally.
         * Every NCSI device can have multiple packages simultaneously, up
           to 8 packages. It's represented by "struct ncsi_package" and
           identified by 3-bits ID.
         * Every NCSI package can have multiple channels, up to 32. It's
           represented by "struct ncsi_channel" and identified by 5-bits ID.
         * Every NCSI channel has version, statistics, various modes and
           filters. They are represented by "struct ncsi_channel_version",
           "struct ncsi_channel_stats", "struct ncsi_channel_mode" and
           "struct ncsi_channel_filter" separately.
         * Apart from AEN (Asynchronous Event Notification), the NCSI stack
           works in terms of command and response. This introduces "struct
           ncsi_req" to represent a complete NCSI transaction made of NCSI
           request and response.
      
      link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.1.0.pdfSigned-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d283bdd
    • V
      net: dsa: support switchdev ageing time attr · 34a79f63
      Vivien Didelot 提交于
      Add a new function for DSA drivers to handle the switchdev
      SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute.
      
      The ageing time is passed as milliseconds.
      
      Also because we can have multiple logical bridges on top of a physical
      switch and ageing time are switch-wide, call the driver function with
      the fastest ageing time in use on the chip instead of the requested one.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34a79f63
    • S
      net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, allow... · b8247f09
      Shmulik Ladkani 提交于
      net: ip_finish_output_gso: If skb_gso_network_seglen exceeds MTU, allow segmentation for local udp tunneled skbs
      
      Given:
       - tap0 and vxlan0 are bridged
       - vxlan0 stacked on eth0, eth0 having small mtu (e.g. 1400)
      
      Assume GSO skbs arriving from tap0 having a gso_size as determined by
      user-provided virtio_net_hdr (e.g. 1460 corresponding to VM mtu of 1500).
      
      After encapsulation these skbs have skb_gso_network_seglen that exceed
      eth0's ip_skb_dst_mtu.
      
      These skbs are accidentally passed to ip_finish_output2 AS IS.
      Alas, each final segment (segmented either by validate_xmit_skb or by
      hardware UFO) would be larger than eth0 mtu.
      As a result, those above-mtu segments get dropped on certain networks.
      
      This behavior is not aligned with the NON-GSO case:
      Assume a non-gso 1500-sized IP packet arrives from tap0. After
      encapsulation, the vxlan datagram is fragmented normally at the
      ip_finish_output-->ip_fragment code path.
      
      The expected behavior for the GSO case would be segmenting the
      "gso-oversized" skb first, then fragmenting each segment according to
      dst mtu, and finally passing the resulting fragments to ip_finish_output2.
      
      'ip_finish_output_gso' already supports this "Slowpath" behavior,
      according to the IPSKB_FRAG_SEGS flag, which is only set during ipv4
      forwarding (not set in the bridged case).
      
      In order to support the bridged case, we'll mark skbs arriving from an
      ingress interface that get udp-encaspulated as "allowed to be fragmented",
      causing their network_seglen to be validated by 'ip_finish_output_gso'
      (and fragment if needed).
      
      Note the TUNNEL_DONT_FRAGMENT tun_flag is still honoured (both in the
      gso and non-gso cases), which serves users wishing to forbid
      fragmentation at the udp tunnel endpoint.
      
      Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: Florian Westphal <fw@strlen.de>
      Signed-off-by: NShmulik Ladkani <shmulik.ladkani@gmail.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8247f09
    • S
      net/ipv4: Introduce IPSKB_FRAG_SEGS bit to inet_skb_parm.flags · 359ebda2
      Shmulik Ladkani 提交于
      This flag indicates whether fragmentation of segments is allowed.
      
      Formerly this policy was hardcoded according to IPSKB_FORWARDED (set by
      either ip_forward or ipmr_forward).
      
      Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
      Cc: Florian Westphal <fw@strlen.de>
      Signed-off-by: NShmulik Ladkani <shmulik.ladkani@gmail.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      359ebda2
  3. 18 7月, 2016 2 次提交
  4. 17 7月, 2016 7 次提交
  5. 16 7月, 2016 6 次提交
  6. 15 7月, 2016 1 次提交
  7. 14 7月, 2016 6 次提交
  8. 13 7月, 2016 5 次提交
    • J
      Bluetooth: Increment management interface revision · 87510973
      Johan Hedberg 提交于
      Increment the mgmt revision due to the recently added new
      reason code for the Disconnected event.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      87510973
    • S
      Bluetooth: Add Authentication Failed reason to Disconnected Mgmt event · 160b9251
      Szymon Janc 提交于
      If link is disconnected due to Authentication Failure (PIN or Key
      Missing status) userspace will be notified about this with proper error
      code. Many LE profiles define "PIN or Key Missing" status as indication
      of remote lost bond so this allows userspace to take action on this.
      
      @ Device Connected: 88:63:DF:88:0E:83 (1) flags 0x0000
              02 01 1a 05 03 0a 18 0d 18 0b 09 48 65 61 72 74  ...........Heart
              20 52 61 74 65                                    Rate
      > HCI Event: Command Status (0x0f) plen 4
            LE Read Remote Used Features (0x08|0x0016) ncmd 1
              Status: Success (0x00)
      > ACL Data RX: Handle 3585 flags 0x02 dlen 11
            ATT: Read By Group Type Request (0x10) len 6
              Handle range: 0x0001-0xffff
              Attribute group type: Primary Service (0x2800)
      > HCI Event: LE Meta Event (0x3e) plen 12
            LE Read Remote Used Features (0x04)
              Status: Success (0x00)
              Handle: 3585
              Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
                LE Encryption
      < HCI Command: LE Start Encryption (0x08|0x0019) plen 28
              Handle: 3585
              Random number: 0x0000000000000000
              Encrypted diversifier: 0x0000
              Long term key: 26201cd479a0921b6f949f0b1fa8dc82
      > HCI Event: Command Status (0x0f) plen 4
            LE Start Encryption (0x08|0x0019) ncmd 1
              Status: Success (0x00)
      > HCI Event: Encryption Change (0x08) plen 4
              Status: PIN or Key Missing (0x06)
              Handle: 3585
              Encryption: Disabled (0x00)
      < HCI Command: Disconnect (0x01|0x0006) plen 3
              Handle: 3585
              Reason: Authentication Failure (0x05)
      > HCI Event: Command Status (0x0f) plen 4
            Disconnect (0x01|0x0006) ncmd 1
              Status: Success (0x00)
      > HCI Event: Disconnect Complete (0x05) plen 4
              Status: Success (0x00)
              Handle: 3585
              Reason: Connection Terminated By Local Host (0x16)
      @ Device Disconnected: 88:63:DF:88:0E:83 (1) reason 4
      
      @ Device Connected: C4:43:8F:A3:4D:83 (0) flags 0x0000
              08 09 4e 65 78 75 73 20 35                       ..Nexus 5
      > HCI Event: Command Status (0x0f) plen 4
            Authentication Requested (0x01|0x0011) ncmd 1
              Status: Success (0x00)
      > HCI Event: Link Key Request (0x17) plen 6
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
      < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
              Link key: 080812e4aa97a863d11826f71f65a933
      > HCI Event: Command Complete (0x0e) plen 10
            Link Key Request Reply (0x01|0x000b) ncmd 1
              Status: Success (0x00)
              Address: C4:43:8F:A3:4D:83 (LG Electronics)
      > HCI Event: Auth Complete (0x06) plen 3
              Status: PIN or Key Missing (0x06)
              Handle: 75
      @ Authentication Failed: C4:43:8F:A3:4D:83 (0) status 0x05
      < HCI Command: Disconnect (0x01|0x0006) plen 3
              Handle: 75
              Reason: Remote User Terminated Connection (0x13)
      > HCI Event: Command Status (0x0f) plen 4
            Disconnect (0x01|0x0006) ncmd 1
              Status: Success (0x00)
      > HCI Event: Disconnect Complete (0x05) plen 4
              Status: Success (0x00)
              Handle: 75
              Reason: Connection Terminated By Local Host (0x16)
      @ Device Disconnected: C4:43:8F:A3:4D:83 (0) reason 4
      Signed-off-by: NSzymon Janc <szymon.janc@codecoup.pl>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      160b9251
    • J
      devlink: add hardware messages tracing facility · e5224f0f
      Jiri Pirko 提交于
      Define a tracepoint and allow user to trace messages going to and from
      hardware associated with devlink instance.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5224f0f
    • W
      net: dsa: Fix non static symbol warning · 85c22bad
      Wei Yongjun 提交于
      Fixes the following sparse warning:
      
      net/dsa/dsa2.c:680:6: warning:
       symbol '_dsa_unregister_switch' was not declared. Should it be static?
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      85c22bad
    • W
      rxrpc: Fix error handling in af_rxrpc_init() · 8addc044
      Wei Yongjun 提交于
      security initialized after alloc workqueue, so we should exit security
      before destroy workqueue in the error handing.
      
      Fixes: 648af7fc ("rxrpc: Absorb the rxkad security module")
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8addc044
  9. 12 7月, 2016 1 次提交
    • P
      ipv4: af_inet: make it explicitly non-modular · d3fc0353
      Paul Gortmaker 提交于
      The Makefile controlling compilation of this file is obj-y,
      meaning that it currently is never being built as a module.
      
      Since MODULE_ALIAS is a no-op for non-modular code, we can simply
      remove the MODULE_ALIAS_NETPROTO variant used here.
      
      We replace module.h with kmod.h since the file does make use of
      request_module() in order to load other modules from here.
      
      We don't have to worry about init.h coming in via the removed
      module.h since the file explicitly includes init.h already.
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: James Morris <jmorris@namei.org>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3fc0353