1. 16 Oct, 2019 2 commits
    • Alexander Lobakin's avatar
      net: core: use listified Rx for GRO_NORMAL in napi_gro_receive() · 6570bc79
      Alexander Lobakin authored
      Commit 323ebb61
       ("net: use listified RX for handling GRO_NORMAL
      skbs") made use of listified skb processing for the users of
      The same technique can be used in a way more common napi_gro_receive()
      to speed up non-merged (GRO_NORMAL) skbs for a wide range of drivers
      including gro_cells and mac80211 users.
      This slightly changes the return value in cases where skb is being
      dropped by the core stack, but it seems to have no impact on related
      drivers' functionality.
      gro_normal_batch is left untouched as it's very individual for every
      single system configuration and might be tuned in manual order to
      achieve an optimal performance.
      Signed-off-by: default avatarAlexander Lobakin <alobakin@dlink.ru>
      Acked-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Himadri Pandya's avatar
      hv_sock: use HV_HYP_PAGE_SIZE for Hyper-V communication · 77ffe333
      Himadri Pandya authored
      Current code assumes PAGE_SIZE (the guest page size) is equal
      to the page size used to communicate with Hyper-V (which is
      always 4K). While this assumption is true on x86, it may not
      be true for Hyper-V on other architectures. For example,
      Linux on ARM64 may have PAGE_SIZE of 16K or 64K. A new symbol,
      HV_HYP_PAGE_SIZE, has been previously introduced to use when
      the Hyper-V page size is intended instead of the guest page size.
      Make this code work on non-x86 architectures by using the new
      HV_HYP_PAGE_SIZE symbol instead of PAGE_SIZE, where appropriate.
      Also replace the now redundant PAGE_SIZE_4K with HV_HYP_PAGE_SIZE.
      The change has no effect on x86, but lays the groundwork to run
      on ARM64 and others.
      Signed-off-by: default avatarHimadri Pandya <himadrispandya@gmail.com>
      Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  2. 15 Oct, 2019 8 commits
  3. 14 Oct, 2019 6 commits
    • David S. Miller's avatar
      Merge branch 'PTP-driver-refactoring-for-SJA1105-DSA' · 85a83a8f
      David S. Miller authored
      Vladimir Oltean says:
      PTP driver refactoring for SJA1105 DSA
      This series creates a better separation between the driver core and the
      PTP portion. Therefore, users who are not interested in PTP can get a
      simpler and smaller driver by compiling it out.
      This is in preparation for further patches: SPI transfer timestamping,
      synchronizing the hardware clock (as opposed to keeping it
      free-running), PPS input/output, etc.
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Change the PTP command access pattern · 66427778
      Vladimir Oltean authored
      The PTP command register contains enable bits for:
      - Putting the 64-bit PTPCLKVAL register in add/subtract or write mode
      - Taking timestamps off of the corrected vs free-running clock
      - Starting/stopping the TTEthernet scheduling
      - Starting/stopping PPS output
      - Resetting the switch
      When a command needs to be issued (e.g. "change the PTPCLKVAL from write
      mode to add/subtract mode"), one cannot simply write to the command
      register setting the PTPCLKADD bit to 1, because that would zeroize the
      other settings. One also cannot do a read-modify-write (that would be
      too easy for this hardware) because not all bits of the command register
      are readable over SPI.
      So this leaves us with the only option of keeping the value of the PTP
      command register in the driver, and operating on that.
      Actually there are 2 types of PTP operations now:
      - Operations that modify the cached PTP command. These operate on
        ptp_data->cmd as a pointer.
      - Operations that apply all previously cached PTP settings, but don't
        otherwise cache what they did themselves. The sja1105_ptp_reset
        function is such an example. It copies the ptp_data->cmd on stack
        before modifying and writing it to SPI.
      This practically means that struct sja1105_ptp_cmd is no longer an
      implementation detail, since it needs to be stored in full into struct
      sja1105_ptp_data, and hence in struct sja1105_private. So the (*ptp_cmd)
      function prototype can change and take struct sja1105_ptp_cmd as second
      argument now.
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Move PTP data to its own private structure · a9d6ed7a
      Vladimir Oltean authored
      This is a non-functional change with 2 goals (both for the case when
      CONFIG_NET_DSA_SJA1105_PTP is not enabled):
      - Reduce the size of the sja1105_private structure.
      - Make the PTP code more self-contained.
      Leaving priv->ptp_data.lock to be initialized in sja1105_main.c is not a
      leftover: it will be used in a future patch "net: dsa: sja1105: Restore
      PTP time after switch reset".
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Make all public PTP functions take dsa_switch as argument · 61c77126
      Vladimir Oltean authored
      The new rule (as already started for sja1105_tas.h) is for functions of
      optional driver components (ones which may be disabled via Kconfig - PTP
      and TAS) to take struct dsa_switch *ds instead of struct sja1105_private
      *priv as first argument.
      This is so that forward-declarations of struct sja1105_private can be
      So make sja1105_ptp.h the second user of this rule.
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Vladimir Oltean's avatar
      net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info · 5b3ae43a
      Vladimir Oltean authored
      We need priv->ptp_caps to hold a structure and not just a pointer,
      because we use container_of in the various PTP callbacks.
      Therefore, the sja1105_ptp_caps structure declared in the global memory
      of the driver serves no further purpose after copying it into
      So just populate priv->ptp_caps with the needed operations and remove
      Signed-off-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · a98d62c3
      David S. Miller authored
      Alexei Starovoitov says:
      pull-request: bpf-next 2019-10-14
      The following pull-request contains BPF updates for your *net-next* tree.
      12 days of development and
      85 files changed, 1889 insertions(+), 1020 deletions(-)
      The main changes are:
      1) auto-generation of bpf_helper_defs.h, from Andrii.
      2) split of bpf_helpers.h into bpf_{helpers, helper_defs, endian, tracing}.h
         and move into libbpf, from Andrii.
      3) Track contents of read-only maps as scalars in the verifier, from Andrii.
      4) small x86 JIT optimization, from Daniel.
      5) cross compilation support, from Ivan.
      6) bpf flow_dissector enhancements, from Jakub and Stanislav.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  4. 13 Oct, 2019 3 commits
  5. 12 Oct, 2019 21 commits