1. 09 Nov, 2017 17 commits
  2. 08 Nov, 2017 23 commits
    • Yi Yang's avatar
      openvswitch: enable NSH support · b2d0f5d5
      Yi Yang authored
      v16->17
       - Fixed disputed check code: keep them in nsh_push and nsh_pop
         but also add them in __ovs_nla_copy_actions
      
      v15->v16
       - Add csum recalculation for nsh_push, nsh_pop and set_nsh
         pointed out by Pravin
       - Move nsh key into the union with ipv4 and ipv6 and add
         check for nsh key in match_validate pointed out by Pravin
       - Add nsh check in validate_set and __ovs_nla_copy_actions
      
      v14->v15
       - Check size in nsh_hdr_from_nlattr
       - Fixed four small issues pointed out By Jiri and Eric
      
      v13->v14
       - Rename skb_push_nsh to nsh_push per Dave's comment
       - Rename skb_pop_nsh to nsh_pop per Dave's comment
      
      v12->v13
       - Fix NSH header length check in set_nsh
      
      v11->v12
       - Fix missing changes old comments pointed out
       - Fix new comments for v11
      
      v10->v11
       - Fix the left three disputable comments for v9
         but not fixed in v10.
      
      v9->v10
       - Change struct ovs_key_nsh to
             struct ovs_nsh_key_base base;
             __be32 context[NSH_MD1_CONTEXT_SIZE];
       - Fix new comments for v9
      
      v8->v9
       - Fix build error reported by daily intel build
         because nsh module isn't selected by openvswitch
      
      v7->v8
       - Rework nested value and mask for OVS_KEY_ATTR_NSH
       - Change pop_nsh to adapt to nsh kernel module
       - Fix many issues per comments from Jiri Benc
      
      v6->v7
       - Remove NSH GSO patches in v6 because Jiri Benc
         reworked it as another patch series and they have
         been merged.
       - Change it to adapt to nsh kernel module added by NSH
         GSO patch series
      
      v5->v6
       - Fix the rest comments for v4.
       - Add NSH GSO support for VxLAN-gpe + NSH and
         Eth + NSH.
      
      v4->v5
       - Fix many comments by Jiri Benc and Eric Garver
         for v4.
      
      v3->v4
       - Add new NSH match field ttl
       - Update NSH header to the latest format
         which will be final format and won't change
         per its author's confirmation.
       - Fix comments for v3.
      
      v2->v3
       - Change OVS_KEY_ATTR_NSH to nested key to handle
         length-fixed attributes and length-variable
         attriubte more flexibly.
       - Remove struct ovs_action_push_nsh completely
       - Add code to handle nested attribute for SET_MASKED
       - Change PUSH_NSH to use the nested OVS_KEY_ATTR_NSH
         to transfer NSH header data.
       - Fix comments and coding style issues by Jiri and Eric
      
      v1->v2
       - Change encap_nsh and decap_nsh to push_nsh and pop_nsh
       - Dynamically allocate struct ovs_action_push_nsh for
         length-variable metadata.
      
      OVS master and 2.8 branch has merged NSH userspace
      patch series, this patch is to enable NSH support
      in kernel data path in order that OVS can support
      NSH in compat mode by porting this.
      Signed-off-by: default avatarYi Yang <yi.y.yang@intel.com>
      Acked-by: default avatarJiri Benc <jbenc@redhat.com>
      Acked-by: default avatarEric Garver <e@erig.me>
      Acked-by: default avatarPravin Shelar <pshelar@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b2d0f5d5
    • Arnd Bergmann's avatar
      pktgen: document 32-bit timestamp overflow · 7f5d3f27
      Arnd Bergmann authored
      Timestamps in pktgen are currently retrieved using the deprecated
      do_gettimeofday() function that wraps its signed 32-bit seconds in 2038
      (on 32-bit architectures) and requires a division operation to calculate
      microseconds.
      
      The pktgen header is also defined with the same limitations, hardcoding
      to a 32-bit seconds field that can be interpreted as unsigned to produce
      times that only wrap in 2106. Whatever code reads the timestamps should
      be aware of that problem in general, but probably doesn't care too
      much as we are mostly interested in the time passing between packets,
      and that is correctly represented.
      
      Using 64-bit nanoseconds would be cheaper and good for 584 years. Using
      monotonic times would also make this unambiguous by avoiding the overflow,
      but would make it harder to correlate to the times with those on remote
      machines. Either approach would require adding a new runtime flag and
      implementing the same thing on the remote side, which we probably don't
      want to do unless someone sees it as a real problem. Also, this should
      be coordinated with other pktgen implementations and might need a new
      magic number.
      
      For the moment, I'm documenting the overflow in the source code, and
      changing the implementation over to an open-coded ktime_get_real_ts64()
      plus division, so we don't have to look at it again while scanning for
      deprecated time interfaces.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f5d3f27
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 2eb3ed33
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS updates for net-next
      
      The following patchset contains Netfilter/IPVS updates for your net-next
      tree, they are:
      
      1) Speed up table replacement on busy systems with large tables
         (and many cores) in x_tables. Now xt_replace_table() synchronizes by
         itself by waiting until all cpus had an even seqcount and we use no
         use seqlock when fetching old counters, from Florian Westphal.
      
      2) Add nf_l4proto_log_invalid() and nf_ct_l4proto_log_invalid() to speed
         up packet processing in the fast path when logging is not enabled, from
         Florian Westphal.
      
      3) Precompute masked address from configuration plane in xt_connlimit,
         from Florian.
      
      4) Don't use explicit size for set selection if performance set policy
         is selected.
      
      5) Allow to get elements from an existing set in nf_tables.
      
      6) Fix incorrect check in nft_hash_deactivate(), from Florian.
      
      7) Cache netlink attribute size result in l4proto->nla_size, from
         Florian.
      
      8) Handle NFPROTO_INET in nf_ct_netns_get() from conntrack core.
      
      9) Use power efficient workqueue in conntrack garbage collector, from
         Vincent Guittot.
      
      10) Remove unnecessary parameter, in conntrack l4proto functions, also
          from Florian.
      
      11) Constify struct nf_conntrack_l3proto definitions, from Florian.
      
      12) Remove all typedefs in nf_conntrack_h323 via coccinelle semantic
          patch, from Harsha Sharma.
      
      13) Don't store address in the rbtree nodes in xt_connlimit, they are
          never used, from Florian.
      
      14) Fix out of bound access in the conntrack h323 helper, patch from
          Eric Sesterhenn.
      
      15) Print symbols for the address returned with %pS in IPVS, from
          Helge Deller.
      
      16) Proc output should only display its own netns in IPVS, from
          KUWAZAWA Takuya.
      
      17) Small clean up in size_entry_mwt(), from Colin Ian King.
      
      18) Use test_and_clear_bit from nf_nat_proto_clean() instead of separated
          non-atomic test and then clear bit, from Florian Westphal.
      
      19) Consolidate prefix length maps in ipset, from Aaron Conole.
      
      20) Fix sparse warnings in ipset, from Jozsef Kadlecsik.
      
      21) Simplify list_set_memsize(), from simran singhal.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2eb3ed33
    • Miquel Raynal's avatar
      net: mvpp2: add ethtool GOP statistics · 118d6298
      Miquel Raynal authored
      Add ethtool statistics support by reading the GOP statistics from the
      hardware counters. Also implement a workqueue to gather the statistics
      every second or some 32-bit counters could overflow.
      Suggested-by: default avatarStefan Chulski <stefanc@marvell.com>
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@free-electrons.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      118d6298
    • David S. Miller's avatar
      Merge branch 'fsl-fman-next' · 403466fe
      David S. Miller authored
      Christophe JAILLET says:
      
      ====================
      fsl/fman: Fix some error handling code in mac_probe
      
      Commit c6e26ea8 ("dpaa_eth: change device used") generated some
      conflicts in my patches waiting for submission. So I took a closer look at
      it.
      
      So here is a serie of 4 patches.
      
      The 1st one is just about a spurious call to 'dev_set_drvdata()', which is
      done in only 1 error handling path in the function.
      
      The 2nd one removes some devm_iounmap/release/kfree functions which look
      useless to me.
      
      The 3rd one fixes a missing of_node_put.
      
      The 4th one is just cosmetic and removes a useless message.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      403466fe
    • Christophe JAILLET's avatar
      fsl/fman: Remove a useless 'dev_err()' call · e51f37bd
      Christophe JAILLET authored
      Memory allocation functions already display some informaton in case of
      memory allocation failure. There is no need to add an extra 'dev_err' here.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e51f37bd
    • Christophe JAILLET's avatar
      fsl/fman: Add a missing 'of_node_put()' call in an error handling path · 25850c31
      Christophe JAILLET authored
      If 'of_phy_find_device()' fails, we must undo the previous 'of_node_get()'
      call, as done the the following error handling code.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25850c31
    • Christophe JAILLET's avatar
      fsl/fman: Remove some useless code · 336eac43
      Christophe JAILLET authored
      There is no need to release explicitly some devm_ allocated resources.
      If the 'mac_probe()' probe function fails, they will be released
      automatically, as already done in the other error handling paths of
      this function.
      
      Also goto '_return_of_get_parent' as in the other error handling paths.
      This is useless (priv->fixed_link is NULL at this point), but at least
      it is consistent.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      336eac43
    • Christophe JAILLET's avatar
      fsl/fman: Remove a useless call to 'dev_set_drvdata()' · 5adb55c9
      Christophe JAILLET authored
      Commit c6e26ea8 ("dpaa_eth: change device used") has removed usage of
      'dev_set_drvdata()' in the 'mac_probe() function.
      
      This call should also be axed.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5adb55c9
    • Colin Ian King's avatar
      rtnetlink: fix missing size for IFLA_IF_NETNSID · 03ac738d
      Colin Ian King authored
      The size for IFLA_IF_NETNSID is missing from the size calculation
      because the proceeding semicolon was not removed. Fix this by removing
      the semicolon.
      
      Detected by CoverityScan, CID#1461135 ("Structurally dead code")
      
      Fixes: 79e1ad14 ("rtnetlink: use netnsid to query interface")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarJiri Benc <jbenc@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03ac738d
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Drop port range check · ac71a1f9
      Egil Hjelmeland authored
      Now that ds->num_ports is 3, there is no need to check range of "port"
      parameter.
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac71a1f9
    • Arnd Bergmann's avatar
      bnxt: fix bnxt_hwrm_fw_set_time for y2038 · 7dfaa7bc
      Arnd Bergmann authored
      On 32-bit architectures, rtc_time_to_tm() returns incorrect results
      in 2038 or later, and do_gettimeofday() is broken for the same reason.
      
      This changes the code to use ktime_get_real_seconds() and time64_to_tm()
      instead, both of them are 2038-safe, and we can also get rid of the
      CONFIG_RTC_LIB dependency that way.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7dfaa7bc
    • Arnd Bergmann's avatar
      of: add of_property_read_variable_* dummy helpers · 96c623e5
      Arnd Bergmann authored
      Commit a67e9472 ("of: Add array read functions with min/max size
      limits") added a new interface for reading variable-length arrays from
      DT properties. One user was added in dsa recently and this causes a
      build error because that code can be built with CONFIG_OF disabled:
      
      net/dsa/dsa2.c: In function 'dsa_switch_parse_member_of':
      net/dsa/dsa2.c:678:7: error: implicit declaration of function 'of_property_read_variable_u32_array'; did you mean 'of_property_read_u32_array'? [-Werror=implicit-function-declaration]
      
      This adds a dummy functions for of_property_read_variable_u32_array()
      and a few others that had been missing here. I decided to move
      of_property_read_string() and of_property_read_string_helper() in the
      process to make it easier to compare the two sets of function prototypes
      to make sure they match.
      
      Fixes: 975e6e32 ("net: dsa: rework switch parsing")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96c623e5
    • Dan Carpenter's avatar
      bnxt: delete some unreachable code · 42ca728b
      Dan Carpenter authored
      We return on the previous line so this "return 0;" statement should just
      be deleted.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42ca728b
    • David S. Miller's avatar
      Merge branch 'dsa-lan9303-Linting' · a8938773
      David S. Miller authored
      Egil Hjelmeland says:
      
      ====================
      net: dsa: lan9303: Linting
      
      This series is non-functional.
       - Correct some errors in comments and documentation.
      Remove scripts/checkpatch.pl WARNINGs and most CHECKs:
       - Replace msleep(1) with usleep_range()
       - Adjust indenting
      
      Changes v1 -> v2:
       - Removed patch 4 "Remove unnecessary parentheses", to be addressed later
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8938773
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Adjust indenting · 92f25caf
      Egil Hjelmeland authored
      Remove scripts/checkpatch.pl CHECKs by adjusting indenting.
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      92f25caf
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Replace msleep(1) with usleep_range() · ec5c91c6
      Egil Hjelmeland authored
      Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range()
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec5c91c6
    • Egil Hjelmeland's avatar
    • Egil Hjelmeland's avatar
      net: dsa: lan9303: Correct register names in comments · 620a5c86
      Egil Hjelmeland authored
      Two comments refer to registers, but lack the LAN9303_ prefix.
      Fix that.
      Signed-off-by: default avatarEgil Hjelmeland <privat@egil-hjelmeland.no>
      Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      620a5c86
    • Wei Yongjun's avatar
      mlxsw: spectrum: Fix error return code in mlxsw_sp_port_create() · d86fd113
      Wei Yongjun authored
      Fix to return a negative error code from the VID  create error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: c57529e1 ("mlxsw: spectrum: Replace vPorts with Port-VLAN")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d86fd113
    • Wei Yongjun's avatar
      dpaa_eth: fix error return code in dpaa_eth_probe() · 29130853
      Wei Yongjun authored
      Fix to return a negative error code from the dpaa_bp_alloc() error
      handling case instead of 0, as done elsewhere in this function.
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29130853
    • David S. Miller's avatar
      Merge branch 'qdisc-RED-offload' · c221fe40
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      qdisc RED offload
      
      Nogah says:
      
      Add an offload support for RED qdisc for mlxsw driver.
      The first patch adds the ability to offload RED qdisc by using
      ndo_setup_tc. It gives RED three commands, to offload, change or delete
      the qdisc, to get the qdisc generic stats and to get it's RED xstats.
      There is no enforcement on a driver to offload or not offload the qdisc and
      it is up to the driver to decide.
      RED qdisc is first being created and only later graft to a parent (unless
      it is a root qdisc). For that reason the return value of the offload
      replace command that is called in the init process doesn't reflect actual
      offload state. The offload state is determined in the dump function so it
      can be reflected to the user. This function is also responsible for stats
      update.
      
      The patchses 2-3 change the name of TC_SETUP_MQPRIO & TC_SETUP_CBS to match
      with the new convention of QDISC prefix.
      The rest of the patchset is driver support for the qdisc. Currently only
      as root qdisc that is being set on the default traffic class. It supports
      only the following parameters of RED: min, max, probability and ECN mode.
      Limit and burst size related params are being ignored at this moment.
      
      ---
      v7->v8 internal: (external RFC->v1)
      - patch 1/9:
       - unite the offload and un-offload functions
       - clean the OFFLOAD flag when the qdisc in not offloaded
      - patch 2/9:
       - minor change to avoid a conflict
      - patch 5/9:
       - check for bad min/max values
       - clean the offloaded qdisc after a bad config call
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c221fe40
    • Nogah Frankel's avatar
      mlxsw: spectrum: Support general qdisc stats · 3670756f
      Nogah Frankel authored
      Add support for ndo_setup_tc with enum tc_setup_type value of
      TC_SETUP_QDISC_STATS. This call updates the generic qdisc stats from the
      cache if the handle ID that is asked for matching the root qdisc ID and
      fails otherwise.
      Currently doesn't support qlen and rqueues.
      Signed-off-by: default avatarNogah Frankel <nogahf@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3670756f