1. 14 3月, 2016 9 次提交
    • P
      xen-netback: support multiple extra info fragments passed from frontend · 562abd39
      Paul Durrant 提交于
      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: NPaul Durrant <paul.durrant@citrix.com>
      Cc: Wei Liu <wei.liu2@citrix.com>
      Acked-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      562abd39
    • P
      xen-netback: re-import canonical netif header · 6b8abef5
      Paul Durrant 提交于
      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: NPaul 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: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b8abef5
    • Z
      netconf: add macro to represent all attributes · 136ba622
      Zhang Shengju 提交于
      This patch adds macro NETCONFA_ALL to represent all type of netconf
      attributes for IPv4 and IPv6.
      Signed-off-by: NZhang Shengju <zhangshengju@cmss.chinamobile.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      136ba622
    • X
      sctp: fix the transports round robin issue when init is retransmitted · 39d2adeb
      Xin Long 提交于
      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: NXin Long <lucien.xin@gmail.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39d2adeb
    • D
      rxrpc: Replace all unsigned with unsigned int · dad8aff7
      David Howells 提交于
      Replace all "unsigned" types with "unsigned int" types.
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dad8aff7
    • D
      Merge tag 'wireless-drivers-next-for-davem-2016-03-09' of... · 00e3d2ef
      David S. Miller 提交于
      Merge tag 'wireless-drivers-next-for-davem-2016-03-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers patches for 4.6
      
      Major changes:
      
      ath10k
      
      * dt: add bindings for ipq4019 wifi block
      * start adding support for qca4019 chip
      
      ath9k
      
      * add device ID for Toshiba WLM-20U2/GN-1080
      * allow more than one interface on DFS channels
      
      bcma
      
      * move flash detection code to ChipCommon core driver
      
      brcmfmac
      
      * IPv6 Neighbor discovery offload
      * driver settings that can be populated from different sources
      * country code setting in firmware
      * length checks to validate firmware events
      * new way to determine device memory size needed for BCM4366
      * various offloads during Wake on Wireless LAN (WoWLAN)
      * full Management Frame Protection (MFP) support
      
      iwlwifi
      
      * add support for thermal device / cooling device
      * improvements in scheduled scan without profiles
      * new firmware support (-21.ucode)
      * add MSIX support for 9000 devices
      * enable MU-MIMO and take care of firmware restart
      * add support for large SKBs in mvm to reach A-MSDU
      * add support for filtering frames from a BA session
      * start implementing the new Rx path for 9000 devices
      * enable the new Radio Resource Management (RRM) nl80211 feature flag
      * add a new module paramater to disable VHT
      * build infrastructure for Dynamic Queue Allocation
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00e3d2ef
    • D
      Merge branch 'net-minor-cleanups-and-optimizations' · f22f5f60
      David S. Miller 提交于
      Alexander Duyck says:
      
      ====================
      A couple of minor clean-ups and optimizations
      
      This patch series is basically just a v2 of a couple patches I recently
      submitted.
      
      The two patches aren't technically related but there are just items I found
      while cleaning up and prepping some further work to enable Tx checksums for
      tunnels.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f22f5f60
    • A
      csum: Update csum_block_add to use rotate instead of byteswap · 33803963
      Alexander Duyck 提交于
      The code for csum_block_add was doing a funky byteswap to swap the even and
      odd bytes of the checksum if the offset was odd.  Instead of doing this we
      can save ourselves some trouble and just shift by 8 as this should have the
      same effect in terms of the final checksum value and only requires one
      instruction.
      
      In addition we can update csum_block_sub to just use csum_block_add with a
      inverse value for csum2.  This way we follow the same code path as
      csum_block_add without having to duplicate it.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33803963
    • A
      gro: Defer clearing of flush bit in tunnel paths · c194cf93
      Alexander Duyck 提交于
      This patch updates the GRO handlers for GRE, VXLAN, GENEVE, and FOU so that
      we do not clear the flush bit until after we have called the next level GRO
      handler.  Previously this was being cleared before parsing through the list
      of frames, however this resulted in several paths where either the bit
      needed to be reset but wasn't as in the case of FOU, or cases where it was
      being set as in GENEVE.  By just deferring the clearing of the bit until
      after the next level protocol has been parsed we can avoid any unnecessary
      bit twiddling and avoid bugs.
      Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c194cf93
  2. 13 3月, 2016 1 次提交
  3. 12 3月, 2016 17 次提交
  4. 11 3月, 2016 13 次提交
    • D
      Merge branch 'flower-offload' · e8ab563f
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      e8ab563f
    • A
      net/mlx5e: Support offload cls_flower with skbedit mark action · 12185a9f
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12185a9f
    • A
      net/mlx5e: Support offload cls_flower with drop action · e3a2b7ed
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3a2b7ed
    • A
      net/mlx5e: Introduce tc offload support · e8f887ac
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e8f887ac
    • A
      net/mlx5e: Add a new priority for kernel flow tables · b6172aac
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b6172aac
    • A
      net/mlx5e: Relax ndo_setup_tc handle restriction · 67ba422e
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      67ba422e
    • A
      net/mlx5_core: Set flow steering dest only for forward rules · 60ab4584
      Amir Vadai 提交于
      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: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60ab4584
    • A
      net/act_skbedit: Utility functions for mark action · 519afb18
      Amir Vadai 提交于
      Enable device drivers to query the action, if and only if is a mark
      action and what value to use for marking.
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      519afb18
    • A
      net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef · 00175aec
      Amir Vadai 提交于
      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: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Suggested-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      00175aec
    • A
      net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public · 8de2d793
      Amir Vadai 提交于
      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: NJohn Fastabend <john.r.fastabend@intel.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8de2d793
    • A
      net/flower: Introduce hardware offload support · 5b33f488
      Amir Vadai 提交于
      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: NJiri Pirko <jiri@mellanox.com>
      Suggested-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b33f488
    • D
      Merge branch 'mediatek-eth' · 10f79037
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      10f79037
    • J
      net-next: mediatek: add an entry to MAINTAINERS · 0c272fc9
      John Crispin 提交于
      Add myself and Felix as the Maintainers for the MediaTek ethernet driver.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn Crispin <blogic@openwrt.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c272fc9