]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc add tc flower offload flow metering policing action
authorPo Liu <Po.Liu@nxp.com>
Wed, 24 Jun 2020 09:36:31 +0000 (17:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 05:05:01 +0000 (22:05 -0700)
commitebdff35d13922548d4558f6b1c076192095dcaba
treeb3a1ee00678de5907c1cce5a89f8e04ee3883c78
parentc98027af2d72b1f6a55553863b36661dcdcdd270
net: enetc add tc flower offload flow metering policing action

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: kernel test robot <lkp@intel.com>
Signed-off-by: Po Liu <Po.Liu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_hw.h
drivers/net/ethernet/freescale/enetc/enetc_qos.c