1. 18 Jan, 2017 6 commits
  2. 17 Jan, 2017 27 commits
    • Jason Baron's avatar
      tcp: accept RST for rcv_nxt - 1 after receiving a FIN · 0e40f4c9
      Jason Baron authored
      Using a Mac OSX box as a client connecting to a Linux server, we have found
      that when certain applications (such as 'ab'), are abruptly terminated
      (via ^C), a FIN is sent followed by a RST packet on tcp connections. The
      FIN is accepted by the Linux stack but the RST is sent with the same
      sequence number as the FIN, and Linux responds with a challenge ACK per
      RFC 5961. The OSX client then sometimes (they are rate-limited) does not
      reply with any RST as would be expected on a closed socket.
      
      This results in sockets accumulating on the Linux server left mostly in
      the CLOSE_WAIT state, although LAST_ACK and CLOSING are also possible.
      This sequence of events can tie up a lot of resources on the Linux server
      since there may be a lot of data in write buffers at the time of the RST.
      Accepting a RST equal to rcv_nxt - 1, after we have already successfully
      processed a FIN, has made a significant difference for us in practice, by
      freeing up unneeded resources in a more expedient fashion.
      
      A packetdrill test demonstrating the behavior:
      
      // testing mac osx rst behavior
      
      // Establish a connection
      0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
      0.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
      0.000 bind(3, ..., ...) = 0
      0.000 listen(3, 1) = 0
      
      0.100 < S 0:0(0) win 32768 <mss 1460,nop,wscale 10>
      0.100 > S. 0:0(0) ack 1 <mss 1460,nop,wscale 5>
      0.200 < . 1:1(0) ack 1 win 32768
      0.200 accept(3, ..., ...) = 4
      
      // Client closes the connection
      0.300 < F. 1:1(0) ack 1 win 32768
      
      // now send rst with same sequence
      0.300 < R. 1:1(0) ack 1 win 32768
      
      // make sure we are in TCP_CLOSE
      0.400 %{
      assert tcpi_state == 7
      }%
      Signed-off-by: default avatarJason Baron <jbaron@akamai.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e40f4c9
    • Tobias Klauser's avatar
      net: ethoc: Make needlessly global struct ethtool_ops static · a870a977
      Tobias Klauser authored
      Make the needlessly global struct ethtool_ops ethoc_ethtool_ops static
      to fix a sparse warning.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a870a977
    • David S. Miller's avatar
      Merge branch 'sfc-RX-hash-config' · 49a67b5d
      David S. Miller authored
      Edward Cree says:
      
      ====================
      sfc: RX hash configuration
      
      This series improves support for getting and setting RX hashing
       configuration on Solarflare adapters through ethtool.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49a67b5d
    • Edward Cree's avatar
      sfc: read back RX hash config from the NIC when querying it with ethtool -x · a707d188
      Edward Cree authored
      Ensures that we report the key and indirection table the NIC is using,
       rather than (if setting them failed earlier) what we wanted it to use.
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a707d188
    • Edward Cree's avatar
    • Ganesh Goudar's avatar
    • Gao Feng's avatar
      net: ping: Use right format specifier to avoid type casting · a7ef6715
      Gao Feng authored
      The inet_num is u16, so use %hu instead of casting it to int. And
      the sk_bound_dev_if is int actually, so it needn't cast to int.
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7ef6715
    • Shyam Saini's avatar
      qed: Replace memset with eth_zero_addr · 0ee28e31
      Shyam Saini authored
      Use eth_zero_addr to assign zero address to the given address array
      instead of memset when the second argument in memset is address
      of zero. Also, it makes the code clearer
      Signed-off-by: default avatarShyam Saini <mayhs11saini@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ee28e31
    • Lance Richardson's avatar
      bridge: sparse fixes in br_ip6_multicast_alloc_query() · 53631a5f
      Lance Richardson authored
      Changed type of csum field in struct igmpv3_query from __be16 to
      __sum16 to eliminate type warning, made same change in struct
      igmpv3_report for consistency.
      
      Fixed up an ntohs() where htons() should have been used instead.
      Signed-off-by: default avatarLance Richardson <lrichard@redhat.com>
      Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53631a5f
    • David S. Miller's avatar
    • David S. Miller's avatar
      Merge branch 'mpls-packet-stats' · e60a4263
      David S. Miller authored
      Robert Shearman says:
      
      ====================
      mpls: Packet stats
      
      This patchset records per-interface packet stats in the MPLS
      forwarding path and exports them using a nest of attributes root at a
      new IFLA_STATS_AF_SPEC attribute as part of RTM_GETSTATS messages:
      
      [IFLA_STATS_AF_SPEC]
       -> [AF_MPLS]
        -> [MPLS_STATS_LINK]
         -> struct mpls_link_stats
      
      The first patch adds the rtnl infrastructure for this, including a new
      callbacks to per-AF ops of fill_stats_af and get_stats_af_size. The
      second patch records MPLS stats and makes use of the infrastructure to
      export them. The rtnl infrastructure could also be used to export IPv6
      stats in the future.
      
      Changes in v2:
       - make incrementing IPv6 stats in mpls_stats_inc_outucastpkts
         conditional on CONFIG_IPV6 to fix build with CONFIG_IPV6=n
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e60a4263
    • Robert Shearman's avatar
      mpls: Packet stats · 27d69105
      Robert Shearman authored
      Having MPLS packet stats is useful for observing network operation and
      for diagnosing network problems. In the absence of anything better,
      RFC2863 and RFC3813 are used for guidance for which stats to expose
      and the semantics of them. In particular rx_noroutes maps to in
      unknown protos in RFC2863. The stats are exposed to userspace via
      AF_MPLS attributes embedded in the IFLA_STATS_AF_SPEC attribute of
      RTM_GETSTATS messages.
      
      All the introduced fields are 64-bit, even error ones, to ensure no
      overflow with long uptimes. Per-CPU counters are used to avoid
      cache-line contention on the commonly used fields. The other fields
      have also been made per-CPU for code to avoid performance problems in
      error conditions on the assumption that on some platforms the cost of
      atomic operations could be more expensive than sending the packet
      (which is what would be done in the success case). If that's not the
      case, we could instead not use per-CPU counters for these fields.
      
      Only unicast and non-fragment are exposed at the moment, but other
      counters can be exposed in the future either by adding to the end of
      struct mpls_link_stats or by additional netlink attributes in the
      AF_MPLS IFLA_STATS_AF_SPEC nested attribute.
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27d69105
    • Robert Shearman's avatar
      net: AF-specific RTM_GETSTATS attributes · aefb4d4a
      Robert Shearman authored
      Add the functionality for including address-family-specific per-link
      stats in RTM_GETSTATS messages. This is done through adding a new
      IFLA_STATS_AF_SPEC attribute under which address family attributes are
      nested and then the AF-specific attributes can be further nested. This
      follows the model of IFLA_AF_SPEC on RTM_*LINK messages and it has the
      advantage of presenting an easily extended hierarchy. The rtnl_af_ops
      structure is extended to provide AFs with the opportunity to fill and
      provide the size of their stats attributes.
      
      One alternative would have been to provide AFs with the ability to add
      attributes directly into the RTM_GETSTATS message without a nested
      hierarchy. I discounted this approach as it increases the rate at
      which the 32 attribute number space is used up and it makes
      implementation a little more tricky for stats dump resuming (at the
      moment the order in which attributes are added to the message has to
      match the numeric order of the attributes).
      
      Another alternative would have been to register per-AF RTM_GETSTATS
      handlers. I discounted this approach as I perceived a common use-case
      to be getting all the stats for an interface and this approach would
      necessitate multiple requests/dumps to retrieve them all.
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aefb4d4a
    • Julia Lawall's avatar
      stmmac: add missing of_node_put · a249708b
      Julia Lawall authored
      The function stmmac_dt_phy provides several possibilities for initializing
      plat->mdio_node, all of which have the effect of increasing the reference
      count of the assigned value.  This field is not updated elsewhere, so the
      value is live until the end of the lifetime of plat (devm_allocated), just
      after the end of stmmac_remove_config_dt.  Thus, add an of_node_put on
      plat->mdio_node in stmmac_remove_config_dt.  It is possible that the field
      mdio_node is never initialized, but of_node_put is NULL-safe, so it is also
      safe to call of_node_put in that case.
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Acked-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a249708b
    • Rolf Neugebauer's avatar
      virtio: don't set VIRTIO_NET_HDR_F_DATA_VALID on xmit · 501db511
      Rolf Neugebauer authored
      This patch part reverts fd2a0437 and e858fae2 which introduced a
      subtle change in how the virtio_net flags are derived from the SKBs
      ip_summed field.
      
      With the above commits, the flags are set to VIRTIO_NET_HDR_F_DATA_VALID
      when ip_summed == CHECKSUM_UNNECESSARY, thus treating it differently to
      ip_summed == CHECKSUM_NONE, which should be the same.
      
      Further, the virtio spec 1.0 / CS04 explicitly says that
      VIRTIO_NET_HDR_F_DATA_VALID must not be set by the driver.
      
      Fixes: fd2a0437 ("virtio_net: introduce virtio_net_hdr_{from,to}_skb")
      Fixes: e858fae2 (" virtio_net: use common code for virtio_net_hdr and skb GSO conversion")
      Signed-off-by: default avatarRolf Neugebauer <rolf.neugebauer@docker.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      501db511
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4b19a9e2
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Handle multicast packets properly in fast-RX path of mac80211, from
          Johannes Berg.
      
       2) Because of a logic bug, the user can't actually force SW
          checksumming on r8152 devices. This makes diagnosis of hw
          checksumming bugs really annoying. Fix from Hayes Wang.
      
       3) VXLAN route lookup does not take the source and destination ports
          into account, which means IPSEC policies cannot be matched properly.
          Fix from Martynas Pumputis.
      
       4) Do proper RCU locking in netvsc callbacks, from Stephen Hemminger.
      
       5) Fix SKB leaks in mlxsw driver, from Arkadi Sharshevsky.
      
       6) If lwtunnel_fill_encap() fails, we do not abort the netlink message
          construction properly in fib_dump_info(), from David Ahern.
      
       7) Do not use kernel stack for DMA buffers in atusb driver, from Stefan
          Schmidt.
      
       8) Openvswitch conntack actions need to maintain a correct checksum,
          fix from Lance Richardson.
      
       9) ax25_disconnect() is missing a check for ax25->sk being NULL, in
          fact it already checks this, but not in all of the necessary spots.
          Fix from Basil Gunn.
      
      10) Action GET operations in the packet scheduler can erroneously bump
          the reference count of the entry, making it unreleasable. Fix from
          Jamal Hadi Salim. Jamal gives a great set of example command lines
          that trigger this in the commit message.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
        net sched actions: fix refcnt when GETing of action after bind
        net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
        net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions
        net/mlx4_core: Fix racy CQ (Completion Queue) free
        net: stmmac: don't use netdev_[dbg, info, ..] before net_device is registered
        net/mlx5e: Fix a -Wmaybe-uninitialized warning
        ax25: Fix segfault after sock connection timeout
        bpf: rework prog_digest into prog_tag
        tipc: allocate user memory with GFP_KERNEL flag
        net: phy: dp83867: allow RGMII_TXID/RGMII_RXID interface types
        ip6_tunnel: Account for tunnel header in tunnel MTU
        mld: do not remove mld souce list info when set link down
        be2net: fix MAC addr setting on privileged BE3 VFs
        be2net: don't delete MAC on close on unprivileged BE3 VFs
        be2net: fix status check in be_cmd_pmac_add()
        cpmac: remove hopeless #warning
        ravb: do not use zero-length alignment DMA descriptor
        mlx4: do not call napi_schedule() without care
        openvswitch: maintain correct checksum state in conntrack actions
        tcp: fix tcp_fastopen unaligned access complaints on sparc
        ...
      4b19a9e2
    • Linus Torvalds's avatar
      Merge branch 'stable/for-linus-4.10' of... · 203f80f1
      Linus Torvalds authored
      Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb
      
      Pull swiotlb fix from Konrad Rzeszutek Wilk:
       "A tiny fix to make sure that page-sized mappings are page-aligned (and
        not say straddle two pages). This is important for some drivers (such
        as NVME)"
      
      * 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
        swiotlb: ensure that page-sized mappings are page-aligned
      203f80f1
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 7e84b303
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - fix regressions detecting HS/HS DDR eMMC cards related to CMD6
      
        MMC host:
         - mmc: mxs-mmc: Fix additional cycles after transmission stop
         - sdhci-acpi: Only powered up enabled acpi child devices
         - meson: avoid possible NULL dereference"
      
      * tag 'mmc-v4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: core: Restore parts of the polling policy when switch to HS/HS DDR
        mmc: mxs-mmc: Fix additional cycles after transmission stop
        mmc: sdhci-acpi: Only powered up enabled acpi child devices
        MMC: meson: avoid possible NULL dereference
      7e84b303
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20170116' of git://git.infradead.org/linux-mtd · 7d8b8c09
      Linus Torvalds authored
      Pull MTD fixes from Brian Norris:
       "Just NAND updates from Boris:
      
         - avoid compiling xway NAND controller driver as a module (which
           didn't work)
      
         - fix tango NAND DT binding and make sure the controller is in a
           clean state at probe time
      
         - add dependency on HAS_IOMEM to the oxnas NAND driver
      
         - fix irq number validity check in the lpc32xx driver"
      
      * tag 'for-linus-20170116' of git://git.infradead.org/linux-mtd:
        mtd: nand: lpc32xx: fix invalid error handling of a requested irq
        mtd: nand: tango: Reset pbus to raw mode in probe
        mtd: nand: tango: Update DT binding description
        mtd: nand: oxnas_nand: fix build errors on arch/um, require HAS_IOMEM
        mtd: nand: xway: fix build because of module functions
        mtd: nand: xway: disable module support
      7d8b8c09
    • Philippe Reynes's avatar
      net: marvell: sky2: use new api ethtool_{get|set}_link_ksettings · 55f78fcd
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55f78fcd
    • Philippe Reynes's avatar
      net: marvell: skge: use new api ethtool_{get|set}_link_ksettings · 0f826385
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      The callback set_link_ksettings no longer update the value
      of advertising, as the struct ethtool_link_ksettings is
      defined as const.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0f826385
    • Philippe Reynes's avatar
      net: jme: use new api ethtool_{get|set}_link_ksettings · c523838c
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      
      As I don't have the hardware, I'd be very pleased if
      someone may test this patch.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c523838c
    • Philippe Reynes's avatar
      net: korina: use new api ethtool_{get|set}_link_ksettings · af473688
      Philippe Reynes authored
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      Signed-off-by: default avatarPhilippe Reynes <tremyfr@gmail.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af473688
    • David S. Miller's avatar
      Merge branch 'mvneta-xmit_more-bql' · b8128c42
      David S. Miller authored
      Marcin Wojtas says:
      
      ====================
      mvneta xmit_more and bql support
      
      This is a delayed v2 of short patchset, which introduces xmit_more and BQL
      to mvneta driver. The only one change was added in xmit_more support -
      condition check preventing excessive descriptors concatenation before
      flushing in HW.
      
      Any comments or feedback would be welcome.
      
      Changelog:
      v1 -> v2:
      
      * Add checking condition that ensures too much descriptors are not
        concatenated before flushing in HW.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8128c42
    • Marcin Wojtas's avatar
      net: mvneta: add BQL support · a29b6235
      Marcin Wojtas authored
      Tests showed that when whole bandwidth is consumed, the latency for
      various kind of traffic can reach high values. With saturated
      link (e.g. with iperf from target to host) simple ping could take
      significant amount of time. BQL proved to improve this situation
      when implemented in mvneta driver. Measurements of ping latency
      for 3 link speeds:
      Speed | Latency w/o BQL | Latency with BQL
      10    |      7-14 ms    |     3.5 ms
      100   |      2-12 ms    |     0.6 ms
      1000  |   often timeout |   up to 2ms
      
      Decreasing latency as above result in sligt performance cost - 4kpps
      (-1.4%) when pushing 64B packets via two bridged interfaces of Armada 38x.
      For 1500B packets in the same setup, the mpstat tool showed +8% of
      CPU occupation (default affinity, second CPU idle). Even though this
      cost seems reasonable to take, considering other improvements.
      
      This commit adds byte queue limit mechanism for the mvneta driver.
      Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a29b6235
    • Simon Guinot's avatar
      net: mvneta: add xmit_more support · 2a90f7e1
      Simon Guinot authored
      Basing on xmit_more flag of the skb, TX descriptors can be concatenated
      before flushing. This commit delay Tx descriptor flush if the queue is
      running and if there is more skb's to send.
      
      A maximum allowed number of descriptors for flushing at once due to
      MVNETA_TXQ_UPDATE_REG(q) reqisters limitation, is 255. Because of that
      a new macro was added (MVNETA_TXQ_DEC_SENT_MASK) in order to ensure that
      concatenated amount of descriptor does not exceed that value.
      Signed-off-by: default avatarSimon Guinot <simon.guinot@sequanux.org>
      Signed-off-by: default avatarMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a90f7e1
    • Jamal Hadi Salim's avatar
      net sched actions: fix refcnt when GETing of action after bind · 0faa9cb5
      Jamal Hadi Salim authored
      Demonstrating the issue:
      
      .. add a drop action
      $sudo $TC actions add action drop index 10
      
      .. retrieve it
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 2 bind 0 installed 29 sec used 29 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      ... bug 1 above: reference is two.
          Reference is actually 1 but we forget to subtract 1.
      
      ... do a GET again and we see the same issue
          try a few times and nothing changes
      ~$ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 2 bind 0 installed 31 sec used 31 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      ... lets try to bind the action to a filter..
      $ sudo $TC qdisc add dev lo ingress
      $ sudo $TC filter add dev lo parent ffff: protocol ip prio 1 \
        u32 match ip dst 127.0.0.1/32 flowid 1:1 action gact index 10
      
      ... and now a few GETs:
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 3 bind 1 installed 204 sec used 204 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 4 bind 1 installed 206 sec used 206 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 5 bind 1 installed 235 sec used 235 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      .... as can be observed the reference count keeps going up.
      
      After the fix
      
      $ sudo $TC actions add action drop index 10
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 1 bind 0 installed 4 sec used 4 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 1 bind 0 installed 6 sec used 6 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      $ sudo $TC qdisc add dev lo ingress
      $ sudo $TC filter add dev lo parent ffff: protocol ip prio 1 \
        u32 match ip dst 127.0.0.1/32 flowid 1:1 action gact index 10
      
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 2 bind 1 installed 32 sec used 32 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      $ sudo $TC -s actions get action gact index 10
      
      	action order 1: gact action drop
      	 random type none pass val 0
      	 index 10 ref 2 bind 1 installed 33 sec used 33 sec
       	Action statistics:
      	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
      	backlog 0b 0p requeues 0
      
      Fixes: aecc5cef ("net sched actions: fix GETing actions")
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0faa9cb5
  3. 16 Jan, 2017 7 commits