1. 14 Mar, 2016 4 commits
    • Paul Durrant's avatar
      xen-netback: support multiple extra info fragments passed from frontend · 562abd39
      Paul Durrant authored
      The code does not currently support a frontend passing multiple extra info
      fragments to the backend in a tx request. The xenvif_get_extras() function
      handles multiple extra_info fragments but make_tx_response() assumes there
      is only ever a single extra info fragment.
      
      This patch modifies xenvif_get_extras() to pass back a count of extra
      info fragments, which is then passed to make_tx_response() (after
      possibly being stashed in pending_tx_info for deferred responses).
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      562abd39
    • Paul Durrant's avatar
      xen-netback: re-import canonical netif header · 6b8abef5
      Paul Durrant authored
      The canonical netif header (in the Xen source repo) and the Linux variant
      have diverged significantly. Recently much documentation has been added to
      the canonical header which is highly useful for developers making
      modifications to either xen-netfront or xen-netback. This patch therefore
      re-imports the canonical header in its entirity.
      
      To maintain compatibility and some style consistency with the old Linux
      variant, the header was stripped of its emacs boilerplate, and
      post-processed and copied into place with the following commands:
      
      ed -s netif.h << EOF
      H
      ,s/NETTXF_/XEN_NETTXF_/g
      ,s/NETRXF_/XEN_NETRXF_/g
      ,s/NETIF_/XEN_NETIF_/g
      ,s/XEN_XEN_/XEN_/g
      ,s/netif/xen_netif/g
      ,s/xen_xen_/xen_/g
      ,s/^typedef.*$//g
      ,s/^    /${TAB}/g
      w
      $
      w
      EOF
      
      indent --line-length 80 --linux-style netif.h \
      -o include/xen/interface/io/netif.h
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6b8abef5
    • Zhang Shengju's avatar
      netconf: add macro to represent all attributes · 136ba622
      Zhang Shengju authored
      This patch adds macro NETCONFA_ALL to represent all type of netconf
      attributes for IPv4 and IPv6.
      Signed-off-by: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      136ba622
    • Xin Long's avatar
      sctp: fix the transports round robin issue when init is retransmitted · 39d2adeb
      Xin Long authored
      prior to this patch, at the beginning if we have two paths in one assoc,
      they may have the same params other than the last_time_heard, it will try
      the paths like this:
      
      1st cycle
        try trans1 fail.
        then trans2 is selected.(cause it's last_time_heard is after trans1).
      
      2nd cycle:
        try  trans2 fail
        then trans2 is selected.(cause it's last_time_heard is after trans1).
      
      3rd cycle:
        try  trans2 fail
        then trans2 is selected.(cause it's last_time_heard is after trans1).
      
      ....
      
      trans1 will never have change to be selected, which is not what we expect.
      we should keeping round robin all the paths if they are just added at the
      beginning.
      
      So at first every tranport's last_time_heard should be initialized 0, so
      that we ensure they have the same value at the beginning, only by this,
      all the transports could get equal chance to be selected.
      
      Then for sctp_trans_elect_best, it should return the trans_next one when
      *trans == *trans_next, so that we can try next if it fails,  but now it
      always return trans. so we can fix it by exchanging these two params when
      we calls sctp_trans_elect_tie().
      
      Fixes: 4c47af4d ('net: sctp: rework multihoming retransmission path selection to rfc4960')
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39d2adeb
  2. 13 Mar, 2016 6 commits
  3. 11 Mar, 2016 17 commits
  4. 10 Mar, 2016 13 commits
    • David S. Miller's avatar
      Merge branch 'flower-offload' · e8ab563f
      David S. Miller authored
      Amir Vadai says:
      
      ====================
      cls_flower hardware offload support
      
      Please see changes from V2 at the bottom.
      
      This patchset introduces cls_flower hardware offload support over ConnectX-4
      driver, more hardware vendors are welcome to use it too.
      
      This patchset is based on John's infrastructure for tc offloading [2] to add
      hardware offload support to the flower filter. It also extends the support to
      an additional tc action - skbedit mark operation.
      NIC driver that was used is ConnectX-4. Feature is off by default and could be
      turned on using ethtool.
      
      Some commands to use this code:
      
      export TC=../iproute2/tc/tc
      export ETH=ens9
      
      ethtool  -K ens9 hw-tc-offload on
      
      $TC qdisc add dev $ETH ingress
      
      $TC filter add dev $ETH protocol ip prio 20 parent ffff: \
      	flower ip_proto 1 \
      	dst_mac 7c:fe:90:69:81:62 \
      	src_mac 7c:fe:90:69:81:56 \
      	dst_ip 11.11.11.11 \
      	src_ip 11.11.11.12 \
      	indev $ETH \
      	action drop
      
      $TC filter add dev $ETH protocol ip prio 30 parent ffff: \
      	flower ip_proto 6 \
      	indev $ETH \
      	action skbedit mark 0x1234
      
      $TC filter add dev $ETH protocol ip prio 10 parent ffff: \
      	handle 0x1234 fw action pass
      
      The code was tested and applied on top of commit 3ebeac1d ("Merge branch
      'cxgb4-next'")
      
      Changes from V2:
      - patch 1/10 ("net/flower: Introduce hardware offload support")
        - Remove unused variable [Dave]
        - Don't fail command when HW can't offload filter [John]
      - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef")
        - Mention in changelog that struct tc_action is now exposed out of the ifdef.
      - patch 4/10 ("net/act_skbedit: Utility functions for mark action")
        - Document clearly that is_tcf_skbedit_mark() is returning true if and only
          if the only action is mark [Dave]
      - patch 8/10 ("net/mlx5e: Introduce tc offload support")
        - make mlx5e_tc_add_flow() static
      
      Changes from V1:
      - patch 3/10 ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef")
        - fixed return value of tc_no_actions
      
      Changes from V0:
      - Use tc_no_actions and tc_for_each_action instead of ifdef CONFIG_NET_CLS_ACT
      - Replace ENOTSUPP (and some EINVAL) with EOPNOTSUPP
      - Name the flower command enum
      - fl_hw_destroy_filter() to return void - nobody uses the return value
      - mlx5e_tc_init() and mlx5e_tc_cleanup() to be called from the right places.
      - When adding HW rule fails - fail the command
      - Rules are added to be processed both by HW and SW unless SKIP_HW is given
      - Adding patch 6/10 ("net/mlx5e: Relax ndo_setup_tc handle restriction")
      
      Main changes from the RFC [1]:
      - API
        - Using ndo_setup_tc() instead of switchdev
      - act_skbedit, act_gact
        - Actions are not serialized to NIC driver, instead using access functions.
      - cls_flower
        - prevent double classification by software by not adding
          successfuly offloaded filters to the hashtable
        - Fixed some bugs in original RFC with rule delete
      - mlx5
        - Adding flow table to kernel namespace instead of a new namespace
        - s/offload/tc/ in many places
        - no need for a special kconfig since switchdev is not used
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8ab563f
    • Amir Vadai's avatar
      net/mlx5e: Support offload cls_flower with skbedit mark action · 12185a9f
      Amir Vadai authored
      Introduce offloading of skbedit mark action.
      
      For example, to mark with 0x1234, all TCP (ip_proto 6) packets arriving
      to interface ens9:
      
       # tc qdisc add dev ens9 ingress
       # tc filter add dev ens9 protocol ip parent ffff: \
           flower ip_proto 6 \
           indev ens9 \
           action skbedit mark 0x1234
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12185a9f
    • Amir Vadai's avatar
      net/mlx5e: Support offload cls_flower with drop action · e3a2b7ed
      Amir Vadai authored
      Parse tc_cls_flower_offload into device specific commands and program
      the hardware to classify and act accordingly.
      
      For example, to drop ICMP (ip_proto 1) packets from specific smac, dmac,
      src_ip, src_ip, arriving to interface ens9:
      
       # tc qdisc add dev ens9 ingress
      
       # tc filter add dev ens9 protocol ip parent ffff: \
           flower ip_proto 1 \
           dst_mac 7c:fe:90:69:81:62 src_mac 7c:fe:90:69:81:56 \
           dst_ip 11.11.11.11 src_ip 11.11.11.12 indev ens9 \
           action drop
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3a2b7ed
    • Amir Vadai's avatar
      net/mlx5e: Introduce tc offload support · e8f887ac
      Amir Vadai authored
      Extend ndo_setup_tc() to support ingress tc offloading. Will be used by
      later patches to offload tc flower filter.
      
      Feature is off by default and could be enabled by issuing:
       # ethtool  -K eth0 hw-tc-offload on
      
      Offloads flow table is dynamically created when first filter is
      added.
      Rules are saved in a hash table that is maintained by the consumer (for
      example - the flower offload in the next patch).
      When last filter is removed and no filters exist in the hash table, the
      offload flow table is destroyed.
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e8f887ac
    • Amir Vadai's avatar
      net/mlx5e: Add a new priority for kernel flow tables · b6172aac
      Amir Vadai authored
      Move the vlan and main flow tables to use priority 1. This will allow
      the upcoming TC offload logic to use a higher priority (0) for the
      offload steering table.
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6172aac
    • Amir Vadai's avatar
      net/mlx5e: Relax ndo_setup_tc handle restriction · 67ba422e
      Amir Vadai authored
      Restricting handle to TC_H_ROOT breaks the old instantiation of mqprio
      to setup a hardware qdisc. This patch relaxes the test, to only check the
      type.
      
      Fixes: 08fb1dac ("net/mlx5e: Support DCBNL IEEE ETS")
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67ba422e
    • Amir Vadai's avatar
      net/mlx5_core: Set flow steering dest only for forward rules · 60ab4584
      Amir Vadai authored
      We need to handle flow table entry destinations only if the action
      associated with the rule is forwarding (MLX5_FLOW_CONTEXT_ACTION_FWD_DEST).
      
      Fixes: 26a81453 ('net/mlx5_core: Introduce flow steering firmware commands')
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      60ab4584
    • Amir Vadai's avatar
      net/act_skbedit: Utility functions for mark action · 519afb18
      Amir Vadai authored
      Enable device drivers to query the action, if and only if is a mark
      action and what value to use for marking.
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      519afb18
    • Amir Vadai's avatar
      net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef · 00175aec
      Amir Vadai authored
      Introduce the macros tc_no_actions and tc_for_each_action to make code
      clearer.
      Extracted struct tc_action out of the ifdef to make calls to
      is_tcf_gact_shot() and similar functions valid, even when it is a nop.
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Suggested-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      00175aec
    • Amir Vadai's avatar
      net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public · 8de2d793
      Amir Vadai authored
      Will be used in a following patch to query if a key is being used, and
      what it's value in the target object.
      Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8de2d793
    • Amir Vadai's avatar
      net/flower: Introduce hardware offload support · 5b33f488
      Amir Vadai authored
      This patch is based on a patch made by John Fastabend.
      It adds support for offloading cls_flower.
      when NETIF_F_HW_TC is on:
        flags = 0       => Rule will be processed twice - by hardware, and if
                           still relevant, by software.
        flags = SKIP_HW => Rull will be processed by software only
      
      If hardware fail/not capabale to apply the rule, operation will NOT
      fail. Filter will be processed by SW only.
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Suggested-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: default avatarAmir Vadai <amir@vadai.me>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b33f488
    • David S. Miller's avatar
      Merge branch 'mediatek-eth' · 10f79037
      David S. Miller authored
      John Crispin says:
      
      ====================
      net-next: mediatek: add ethernet driver
      
      This series adds support for the Mediatek ethernet core found on current ARM
      based SoCs. The driver works on MT2701 and MT7623 SoCs
      
      Instead of trying to upstream everything at once I decided to concentrate on
      the important parts required to make current generation silicon work. The V3
      series only includes the code required to make dual MAC setups work and only
      supports the newer QDMA engine.
      
      Changes in V5
      * reduce the mdio timeut to HZ
      * add a call to usleep_range() which schedules in the background.
      
      Changes in V4
      * remove ugly _FE macro, use offsetof() instead
      
      Changes in V3
      * only include code for MT2701/7623 support
      * drop support for PDMA and older MIPS based SoCs
      * drop switch support
      
      Changes in V2
      * change the namespace of the functions from fe_* to mtk_*
      * add support for the latest generation of ARM SoCs
      * add dual MAC support
      * remove the swconfig specific bits
      * remove most of the magic values and replace them with defines
      * add verbose descriptions to the patches
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10f79037
    • John Crispin's avatar
      net-next: mediatek: add an entry to MAINTAINERS · 0c272fc9
      John Crispin authored
      Add myself and Felix as the Maintainers for the MediaTek ethernet driver.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0c272fc9