1. 15 Nov, 2019 5 commits
    • Phil Sutter's avatar
      netfilter: Support iif matches in POSTROUTING · 28f8bfd1
      Phil Sutter authored
      Instead of generally passing NULL to NF_HOOK_COND() for input device,
      pass skb->dev which contains input device for routed skbs.
      
      Note that iptables (both legacy and nft) reject rules with input
      interface match from being added to POSTROUTING chains, but nftables
      allows this.
      
      Cc: Eric Garver <eric@garver.life>
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      28f8bfd1
    • Pablo Neira Ayuso's avatar
      netfilter: nf_flow_table_offload: add IPv6 support · 5c27d8d7
      Pablo Neira Ayuso authored
      Add nf_flow_rule_route_ipv6() and use it from the IPv6 and the inet
      flowtable type definitions. Rename the nf_flow_rule_route() function to
      nf_flow_rule_route_ipv4().
      
      Adjust maximum number of actions, which now becomes 16 to leave
      sufficient room for the IPv6 address mangling for NAT.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      5c27d8d7
    • Pablo Neira Ayuso's avatar
      netfilter: nf_flow_table_offload: add flow_action_entry_next() and use it · 4a766d49
      Pablo Neira Ayuso authored
      This function retrieves a spare action entry from the array of actions.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      4a766d49
    • Arnd Bergmann's avatar
      netfilter: nft_meta: use 64-bit time arithmetic · 6408c40c
      Arnd Bergmann authored
      On 32-bit architectures, get_seconds() returns an unsigned 32-bit
      time value, which also matches the type used in the nft_meta
      code. This will not overflow in year 2038 as a time_t would, but
      it still suffers from the overflow problem later on in year 2106.
      
      Change this instance to use the time64_t type consistently
      and avoid the deprecated get_seconds().
      
      The nft_meta_weekday() calculation potentially gets a little slower
      on 32-bit architectures, but now it has the same behavior as on
      64-bit architectures and does not overflow.
      
      Fixes: 63d10e12 ("netfilter: nft_meta: support for time matching")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      6408c40c
    • Arnd Bergmann's avatar
      netfilter: xt_time: use time64_t · fcbad829
      Arnd Bergmann authored
      The current xt_time driver suffers from the y2038 overflow on 32-bit
      architectures, when the time of day calculations break.
      
      Also, on both 32-bit and 64-bit architectures, there is a problem with
      info->date_start/stop, which is part of the user ABI and overflows in
      in 2106.
      
      Fix the first issue by using time64_t and explicit calls to div_u64()
      and div_u64_rem(), and document the seconds issue.
      
      The explicit 64-bit division is unfortunately slower on 32-bit
      architectures, but doing it as unsigned lets us use the optimized
      division-through-multiplication path in most configurations.  This should
      be fine, as the code already does not allow any negative time of day
      values.
      
      Using u32 seconds values consistently would probably also work and
      be a little more efficient, but that doesn't feel right as it would
      propagate the y2106 overflow to more place rather than fewer.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      fcbad829
  2. 13 Nov, 2019 28 commits
  3. 12 Nov, 2019 7 commits
    • David S. Miller's avatar
      Merge tag 'linux-can-next-for-5.5-20191111' of... · e0580b50
      David S. Miller authored
      Merge tag 'linux-can-next-for-5.5-20191111' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can-next 2019-10-07
      
      this is a pull request for net-next/master consisting of 32 patches.
      
      The first patch is by Gustavo A. R. Silva and removes unused code in the
      generic CAN infrastructure.
      
      The next three patches target the mcp251x driver. The one by Andy
      Shevchenko removes the legacy platform data support from the driver. The
      other two are by Timo Schlüßler and reset the device only when needed,
      to prevent glitches on the output when GPIO support is added.
      
      I'm contributing two patches fixing checkpatch warnings in the
      c_can_platform and peak_canfd driver.
      
      Stephane Grosjean's patch for the peak_canfd driver adds hw timestamps
      support in rx skbs.
      
      The next three patches target the xilinx_can driver. One patch by me to
      fix checkpatch warnings, one patch by Anssi Hannula to avoid non
      requested bus error frames, and a patch by YueHaibing that switches the
      driver to devm_platform_ioremap_resource().
      
      Pankaj Sharma contributes two patches for the m_can driver, the first
      one adds support for one shot mode, the other support for handling
      arbitration errors.
      
      Followed by four patches by YueHaibing, switching the grcan, ifi, rcar,
      and sun4i drivers to devm_platform_ioremap_resource()
      
      I'm contributing cleanup patches for the rx-offload helper, while Joakim
      Zhang's patch prepares the rx-offload helper for CAN-FD support. The rx
      offload users flexcan and ti_hecc are converted accordingly.
      
      The remaining twelve patches target the flexcan driver. First Joakim
      Zhang switches the driver to devm_platform_ioremap_resource(). The
      remaining eleven patch are by me and clean up the abstract the access of
      the iflag1 and iflag2 register both for RX and TX mailboxes. This is a
      preparation for the upcoming CAN-FD support.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0580b50
    • Arthur Fabre's avatar
      sfc: trace_xdp_exception on XDP failure · 9440a875
      Arthur Fabre authored
      The sfc driver can drop packets processed with XDP, notably when running
      out of buffer space on XDP_TX, or returning an unknown XDP action.
      This increments the rx_xdp_bad_drops ethtool counter.
      
      Call trace_xdp_exception everywhere rx_xdp_bad_drops is incremented,
      except for fragmented RX packets as the XDP program hasn't run yet.
      This allows it to easily be monitored from userspace.
      
      This mirrors the behavior of other drivers.
      Signed-off-by: default avatarArthur Fabre <afabre@cloudflare.com>
      Acked-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9440a875
    • YueHaibing's avatar
      ptp: ptp_clockmatrix: Fix build error · 1e86606b
      YueHaibing authored
      When do randbuilding, we got this warning:
      
      WARNING: unmet direct dependencies detected for PTP_1588_CLOCK
        Depends on [n]: NET [=y] && POSIX_TIMERS [=n]
        Selected by [y]:
        - PTP_1588_CLOCK_IDTCM [=y]
      
      Make PTP_1588_CLOCK_IDTCM depends on PTP_1588_CLOCK to fix this.
      
      Fixes: 3a6ba7dc ("ptp: Add a ptp clock driver for IDT ClockMatrix.")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarVincent Cheng  <vincent.cheng.xh@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e86606b
    • Davide Caratti's avatar
      net/sched: actions: remove unused 'order' · e0e2b35b
      Davide Caratti authored
      after commit 4097e9d2 ("net: sched: don't use tc_action->order during
      action dump"), 'act->order' is initialized but then it's no more read, so
      we can just remove this member of struct tc_action.
      
      CC: Ivan Vecera <ivecera@redhat.com>
      Signed-off-by: default avatarDavide Caratti <dcaratti@redhat.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarIvan Vecera <ivecera@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0e2b35b
    • Colin Ian King's avatar
      net: dsa: mv88e6xxx: fix broken if statement because of a stray semicolon · 4e4637b1
      Colin Ian King authored
      There is a stray semicolon in an if statement that will cause a dev_err
      message to be printed unconditionally. Fix this by removing the stray
      semicolon.
      
      Addresses-Coverity: ("Stay semicolon")
      Fixes: f0942e00 ("net: dsa: mv88e6xxx: Add support for port mirroring")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e4637b1
    • David S. Miller's avatar
      Merge branch 'Update-devlink-binary-output' · 084346be
      David S. Miller authored
      Aya Levin says:
      
      ====================
      Update devlink binary output
      
      This series changes the devlink binary interface:
      -The first patch forces binary values to be enclosed in an array. In
       addition, devlink_fmsg_binary_pair_put breaks the binary value into
       chunks to comply with devlink's restriction for value length.
      -The second patch removes redundant code and uses the fixed devlink
       interface (devlink_fmsg_binary_pair_put).
      -The third patch make self test to use the updated devlink
       interface.
      -The fourth, adds a verification of dumping a very large binary
       content. This test verifies breaking the data into chunks in a valid
       JSON output.
      
      Series was generated against net-next commit:
      ca22d697 Merge branch 'stmmac-next'
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      084346be
    • Aya Levin's avatar
      selftests: Add a test of large binary to devlink health test · ff18176a
      Aya Levin authored
      Add a test of 2 PAGEs size (exceeds devlink previous length limitation)
      of binary data on a 'devlink health dump show' command. Set binary length
      to 8192, issue a dump show command and clear it.
      Signed-off-by: default avatarAya Levin <ayal@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff18176a