1. 26 6月, 2020 31 次提交
  2. 25 6月, 2020 9 次提交
    • P
      net: enetc add tc flower offload flow metering policing action · d621d770
      Po Liu 提交于
      Flow metering entries in IEEE 802.1Qci is an optional function for a
      flow filtering module. Flow metering is two rates two buckets and three
      color marker to policing the frames. This patch only enable one rate one
      bucket and in color blind mode. Flow metering instance are as
      specified in the algorithm in MEF 10.3 and in Bandwidth Profile
      Parameters. They are:
      
      a) Flow meter instance identifier. An integer value identifying the flow
      meter instance. The patch use the police 'index' as thin value.
      b) Committed Information Rate (CIR), in bits per second. This patch use
      the 'rate_bytes_ps' represent this value.
      c) Committed Burst Size (CBS), in octets. This patch use the 'burst'
      represent this value.
      d) Excess Information Rate (EIR), in bits per second.
      e) Excess Burst Size per Bandwidth Profile Flow (EBS), in octets.
      And plus some other parameters. This patch set EIR/EBS default disable
      and color blind mode.
      
      v1->v2 changes:
      - Use div_u64() as division replace the '/' report:
      
      All errors (new ones prefixed by >>):
      
         ld: drivers/net/ethernet/freescale/enetc/enetc_qos.o: in function `enetc_flowmeter_hw_set':
      >> enetc_qos.c:(.text+0x66): undefined reference to `__udivdi3'
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NPo Liu <Po.Liu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d621d770
    • P
      net: qos: police action add index for tc flower offloading · 627e39b1
      Po Liu 提交于
      Hardware device may include more than one police entry. Specifying the
      action's index make it possible for several tc filters to share the same
      police action when installing the filters.
      
      Propagate this index to device drivers through the flow offload
      intermediate representation, so that drivers could share a single
      hardware policer between multiple filters.
      
      v1->v2 changes:
      - Update the commit message suggest by Ido Schimmel <idosch@idosch.org>
      Signed-off-by: NPo Liu <Po.Liu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      627e39b1
    • P
      net: enetc: add support max frame size for tc flower offload · 89d1f096
      Po Liu 提交于
      Base on the tc flower offload police action add max frame size by the
      parameter 'mtu'. Tc flower device driver working by the IEEE 802.1Qci
      stream filter can implement the max frame size filtering. Add it to the
      current hardware tc flower stearm filter driver.
      Signed-off-by: NPo Liu <Po.Liu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89d1f096
    • P
      net: qos: add tc police offloading action with max frame size limit · 19e528dc
      Po Liu 提交于
      Current police offloading support the 'burst'' and 'rate_bytes_ps'. Some
      hardware own the capability to limit the frame size. If the frame size
      larger than the setting, the frame would be dropped. For the police
      action itself already accept the 'mtu' parameter in tc command. But not
      extend to tc flower offloading. So extend 'mtu' to tc flower offloading.
      Signed-off-by: NPo Liu <Po.Liu@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      19e528dc
    • Y
      lan743x: Remove duplicated include from lan743x_main.c · 147373d9
      YueHaibing 提交于
      Remove duplicated include.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      147373d9
    • D
      Merge branch 'net-bridge-fdb-activity-tracking' · 593b03d4
      David S. Miller 提交于
      Nikolay Aleksandrov says:
      
      ====================
      net: bridge: fdb activity tracking
      
      This set adds extensions needed for EVPN multi-homing proper and
      efficient mac sync. User-space (e.g. FRR) needs to be able to track
      non-dynamic entry activity on per-fdb basis depending if a tracked fdb is
      currently peer active or locally active and needs to be able to add new
      peer active fdb (static + track + inactive) without refreshing it to get
      real activity tracking. Patch 02 adds a new NDA attribute - NDA_FDB_EXT_ATTRS
      to avoid future pollution of NDA attributes by bridge or vxlan. New
      bridge/vxlan specific fdb attributes are embedded in NDA_FDB_EXT_ATTRS,
      which is used in patch 03 to pass the new NFEA_ACTIVITY_NOTIFY attribute
      which controls if an fdb should be tracked and also reflects its current
      state when dumping. It is treated as a bitfield, current valid bits are:
       1 - mark an entry for activity tracking
       2 - mark an entry as inactive to avoid multiple notifications and
           reflect state properly
      
      Patch 04 adds the ability to avoid refreshing an entry when changing it
      via the NFEA_DONT_REFRESH flag. That allows user-space to mark a static
      entry for tracking and keep its real activity unchanged.
      The set has been extensively tested with FRR and those changes will
      be upstreamed if/after it gets accepted.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      593b03d4
    • N
      net: bridge: add a flag to avoid refreshing fdb when changing/adding · b5f1d9ec
      Nikolay Aleksandrov 提交于
      When we modify or create a new fdb entry sometimes we want to avoid
      refreshing its activity in order to track it properly. One example is
      when a mac is received from EVPN multi-homing peer by FRR, which doesn't
      want to change local activity accounting. It makes it static and sets a
      flag to track its activity.
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5f1d9ec
    • N
      net: bridge: add option to allow activity notifications for any fdb entries · 31cbc39b
      Nikolay Aleksandrov 提交于
      This patch adds the ability to notify about activity of any entries
      (static, permanent or ext_learn). EVPN multihoming peers need it to
      properly and efficiently handle mac sync (peer active/locally active).
      We add a new NFEA_ACTIVITY_NOTIFY attribute which is used to dump the
      current activity state and to control if static entries should be monitored
      at all. We use 2 bits - one to activate fdb entry tracking (disabled by
      default) and the second to denote that an entry is inactive. We need
      the second bit in order to avoid multiple notifications of inactivity.
      Obviously this makes no difference for dynamic entries since at the time
      of inactivity they get deleted, while the tracked non-dynamic entries get
      the inactive bit set and get a notification.
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31cbc39b
    • N
      net: neighbor: add fdb extended attribute · 899426b3
      Nikolay Aleksandrov 提交于
      Add an attribute to NDA which will contain all future fdb-specific
      attributes in order to avoid polluting the NDA namespace with e.g.
      bridge or vxlan specific attributes. The attribute is called
      NDA_FDB_EXT_ATTRS and the structure would look like:
       [NDA_FDB_EXT_ATTRS] = {
          [NFEA_xxx]
       }
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      899426b3