1. 16 8月, 2017 3 次提交
  2. 08 8月, 2017 1 次提交
  3. 13 7月, 2017 1 次提交
  4. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  5. 07 6月, 2017 4 次提交
  6. 12 5月, 2017 3 次提交
    • U
      s390/qeth: add missing hash table initializations · ebccc739
      Ursula Braun 提交于
      commit 5f78e29c ("qeth: optimize IP handling in rx_mode callback")
      added new hash tables, but missed to initialize them.
      
      Fixes: 5f78e29c ("qeth: optimize IP handling in rx_mode callback")
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Reviewed-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ebccc739
    • J
      s390/qeth: unbreak OSM and OSN support · 2d2ebb3e
      Julian Wiedmann 提交于
      commit b4d72c08 ("qeth: bridgeport support - basic control")
      broke the support for OSM and OSN devices as follows:
      
      As OSM and OSN are L2 only, qeth_core_probe_device() does an early
      setup by loading the l2 discipline and calling qeth_l2_probe_device().
      In this context, adding the l2-specific bridgeport sysfs attributes
      via qeth_l2_create_device_attributes() hits a BUG_ON in fs/sysfs/group.c,
      since the basic sysfs infrastructure for the device hasn't been
      established yet.
      
      Note that OSN actually has its own unique sysfs attributes
      (qeth_osn_devtype), so the additional attributes shouldn't be created
      at all.
      For OSM, add a new qeth_l2_devtype that contains all the common
      and l2-specific sysfs attributes.
      When qeth_core_probe_device() does early setup for OSM or OSN, assign
      the corresponding devtype so that the ccwgroup probe code creates the
      full set of sysfs attributes.
      This allows us to skip qeth_l2_create_device_attributes() in case
      of an early setup.
      
      Any device that can't do early setup will initially have only the
      generic sysfs attributes, and when it's probed later
      qeth_l2_probe_device() adds the l2-specific attributes.
      
      If an early-setup device is removed (by calling ccwgroup_ungroup()),
      device_unregister() will - using the devtype - delete the
      l2-specific attributes before qeth_l2_remove_device() is called.
      So make sure to not remove them twice.
      
      What complicates the issue is that qeth_l2_probe_device() and
      qeth_l2_remove_device() is also called on a device when its
      layer2 attribute changes (ie. its layer mode is switched).
      For early-setup devices this wouldn't work properly - we wouldn't
      remove the l2-specific attributes when switching to L3.
      But switching the layer mode doesn't actually make any sense;
      we already decided that the device can only operate in L2!
      So just refuse to switch the layer mode on such devices. Note that
      OSN doesn't have a layer2 attribute, so we only need to special-case
      OSM.
      
      Based on an initial patch by Ursula Braun.
      
      Fixes: b4d72c08 ("qeth: bridgeport support - basic control")
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2d2ebb3e
    • U
      s390/qeth: handle sysfs error during initialization · 9111e788
      Ursula Braun 提交于
      When setting up the device from within the layer discipline's
      probe routine, creating the layer-specific sysfs attributes can fail.
      Report this error back to the caller, and handle it by
      releasing the layer discipline.
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      [jwi: updated commit msg, moved an OSN change to a subsequent patch]
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9111e788
  7. 12 4月, 2017 6 次提交
  8. 07 4月, 2017 2 次提交
  9. 25 3月, 2017 2 次提交
    • J
      s390/qeth: no ETH header for outbound AF_IUCV · acd9776b
      Julian Wiedmann 提交于
      With AF_IUCV traffic, the skb passed to hard_start_xmit() has a 14 byte
      slot at skb->data, intended for an ETH header. qeth_l3_fill_af_iucv_hdr()
      fills this ETH header... and then immediately moves it to the
      skb's headroom, where it disappears and is never seen again.
      
      But it's still possible for us to return NETDEV_TX_BUSY after the skb has
      been modified. Since we didn't get a private copy of the skb, the next
      time the skb is delivered to hard_start_xmit() it no longer has the
      expected layout (we moved the ETH header to the headroom, so skb->data
      now starts at the IUCV_TRANS header). So when qeth_l3_fill_af_iucv_hdr()
      does another round of rebuilding, the resulting qeth header ends up
      all wrong. On transmission, the buffer is then rejected by
      the HiperSockets device with SBALF15 = x'04'.
      When this error is passed back to af_iucv as TX_NOTIFY_UNREACHABLE, it
      tears down the offending socket.
      
      As the ETH header for AF_IUCV serves no purpose, just align the code to
      what we do for IP traffic on L3 HiperSockets: keep the ETH header at
      skb->data, and pass down data_offset = ETH_HLEN to qeth_fill_buffer().
      When mapping the payload into the SBAL elements, the ETH header is then
      stripped off. This avoids the skb manipulations in
      qeth_l3_fill_af_iucv_hdr(), and any buffer re-entering hard_start_xmit()
      after NETDEV_TX_BUSY is now processed properly.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acd9776b
    • J
      s390/qeth: size calculation outbound buffers · 7d969d2e
      Julian Wiedmann 提交于
      Depending on the device type, hard_start_xmit() builds different output
      buffer formats. For instance with HiperSockets, on both L2 and L3 we
      strip the ETH header from the skb - L3 doesn't need it, and L2 carries
      it in the buffer's header element.
      For this, we pass data_offset = ETH_HLEN all the way down to
      __qeth_fill_buffer(), where skb->data is then adjusted accordingly.
      But the initial size calculation still considers the *full* skb length
      (including the ETH header). So qeth_get_elements_no() can erroneously
      reject a skb as too big, even though it would actually fit into an
      output buffer once the ETH header has been trimmed off later.
      
      Fix this by passing an additional offset to qeth_get_elements_no(),
      that indicates where in the skb the on-wire data actually begins.
      Since the current code uses data_offset=-1 for some special handling
      on OSA, we need to clamp data_offset to 0...
      
      On HiperSockets this helps when sending ~MTU-size skbs with weird page
      alignment. No change for OSA or AF_IUCV.
      Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
      Signed-off-by: NUrsula Braun <ubraun@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7d969d2e
  10. 12 1月, 2017 1 次提交
  11. 21 10月, 2016 1 次提交
  12. 16 9月, 2016 5 次提交
  13. 05 7月, 2016 1 次提交
  14. 17 6月, 2016 9 次提交