1. 23 2月, 2022 2 次提交
  2. 22 2月, 2022 6 次提交
  3. 21 2月, 2022 7 次提交
  4. 20 2月, 2022 9 次提交
    • V
      net: prestera: acl: fix 'client_map' buff overflow · 48c77bdf
      Volodymyr Mytnyk 提交于
      smatch warnings:
      drivers/net/ethernet/marvell/prestera/prestera_acl.c:103
      prestera_acl_chain_to_client() error: buffer overflow
      'client_map' 3 <= 3
      
      	prestera_acl_chain_to_client(u32 chain_index, ...)
              ...
      	u32 client_map[] = {
      		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_0,
      		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_1,
      		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_2
      	};
      	if (chain_index > ARRAY_SIZE(client_map))
      	...
      
      Fixes: fa5d824c ("net: prestera: acl: add multi-chain support offload")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NVolodymyr Mytnyk <vmytnyk@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48c77bdf
    • A
      net: dsa: microchip: add ksz8563 to ksz9477 I2C driver · 173a272a
      Ahmad Fatoum 提交于
      The KSZ9477 SPI driver already has support for the KSZ8563. The same switch
      chip can also be managed via i2c and we have an KSZ9477 I2C driver, but
      that one lacks the relevant compatible entry. Add it.
      
      DT bindings already describe this compatible.
      Signed-off-by: NAhmad Fatoum <a.fatoum@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      173a272a
    • O
      net: dsa: microchip: ksz9477: export HW stats over stats64 interface · a7f4f13a
      Oleksij Rempel 提交于
      Provide access to HW offloaded packets over stats64 interface.
      The rx/tx_bytes values needed some fixing since HW is accounting size of
      the Ethernet frame together with FCS.
      Signed-off-by: NOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: NVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a7f4f13a
    • R
      net: phylink: remove phylink_config's pcs_poll · 64b4a0f8
      Russell King (Oracle) 提交于
      phylink_config's pcs_poll is no longer used, let's get rid of it.
      Signed-off-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64b4a0f8
    • C
      atm: nicstar: Use kcalloc() to simplify code · 92c54a65
      Christophe JAILLET 提交于
      Use kcalloc() instead of kmalloc_array() and a loop to set all the values
      of the array to NULL.
      
      While at it, remove a duplicated assignment to 'scq->num_entries'.
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      92c54a65
    • R
      dpaa2-eth: Update SINGLE_STEP register access · c4680c97
      Radu Bulie 提交于
      DPAA2 MAC supports 1588 one step timestamping.
      If this option is enabled then for each transmitted PTP event packet,
      the 1588 SINGLE_STEP register is accessed to modify the following fields:
      
      -offset of the correction field inside the PTP packet
      -UDP checksum update bit,  in case the PTP event packet has
       UDP encapsulation
      
      These values can change any time, because there may be multiple
      PTP clients connected, that receive various 1588 frame types:
      - L2 only frame
      - UDP / Ipv4
      - UDP / Ipv6
      - other
      
      The current implementation uses dpni_set_single_step_cfg to update the
      SINLGE_STEP register.
      Using an MC command  on the Tx datapath for each transmitted 1588 message
      introduces high delays, leading to low throughput and consequently to a
      small number of supported PTP clients. Besides these, the nanosecond
      correction field from the PTP packet will contain the high delay from the
      driver which together with the originTimestamp will render timestamp
      values that are unacceptable in a GM clock implementation.
      
      This patch updates the Tx datapath for 1588 messages when single step
      timestamp is enabled and provides direct access to SINGLE_STEP register,
      eliminating the  overhead caused by the dpni_set_single_step_cfg
      MC command. MC version >= 10.32 implements this functionality.
      If the MC version does not have support for returning the
      single step register base address, the driver will use
      dpni_set_single_step_cfg command for updates operations.
      
      All the delay introduced by dpni_set_single_step_cfg
      function will be eliminated (if MC version has support for returning the
      base address of the single step register), improving the egress driver
      performance for PTP packets when single step timestamping is enabled.
      
      Before these changes the maximum throughput for 1588 messages with
      single step hardware timestamp enabled was around 2000pps.
      After the updates the throughput increased up to 32.82 Mbps / 46631.02 pps.
      Signed-off-by: NRadu Bulie <radu-andrei.bulie@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4680c97
    • R
      dpaa2-eth: Update dpni_get_single_step_cfg command · 9572594e
      Radu Bulie 提交于
      dpni_get_single_step_cfg is an MC firmware command used for
      retrieving the contents of SINGLE_STEP 1588 register available
      in a DPMAC.
      
      This patch adds a new version of this command that returns as an extra
      argument the physical base address of the aforementioned register.
      The address will be used to directly modify the contents of the
      SINGLE_STEP register instead of invoking the MC command
      dpni_set_single_step_cgf. The former approach introduced huge delays on
      the TX datapath when one step PTP events were transmitted. This led to low
      throughput and high latencies observed in the PTP correction field.
      Signed-off-by: NRadu Bulie <radu-andrei.bulie@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9572594e
    • V
      net: prestera: flower: fix destroy tmpl in chain · b3ae2d35
      Volodymyr Mytnyk 提交于
      Fix flower destroy template callback to release template
      only for specific tc chain instead of all chain tempaltes.
      
      The issue was intruduced by previous commit that introduced
      multi-chain support.
      
      Fixes: fa5d824c ("net: prestera: acl: add multi-chain support offload")
      Signed-off-by: NVolodymyr Mytnyk <vmytnyk@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3ae2d35
    • M
      mctp i2c: MCTP I2C binding driver · f5b8abf9
      Matt Johnston 提交于
      Provides MCTP network transport over an I2C bus, as specified in
      DMTF DSP0237. All messages between nodes are sent as SMBus Block Writes.
      
      Each I2C bus to be used for MCTP is flagged in devicetree by a
      'mctp-controller' property on the bus node. Each flagged bus gets a
      mctpi2cX net device created based on the bus number. A
      'mctp-i2c-controller' I2C client needs to be added under the adapter. In
      an I2C mux situation the mctp-i2c-controller node must be attached only
      to the root I2C bus. The I2C client will handle incoming I2C slave block
      write data for subordinate busses as well as its own bus.
      
      In configurations without devicetree a driver instance can be attached
      to a bus using the I2C slave new_device mechanism.
      
      The MCTP core will hold/release the MCTP I2C device while responses
      are pending (a 6 second timeout or once a socket is closed, response
      received etc). While held the MCTP I2C driver will lock the I2C bus so
      that the correct I2C mux remains selected while responses are received.
      
      (Ideally we would just lock the mux to keep the current bus selected for
      the response rather than a full I2C bus lock, but that isn't exposed in
      the I2C mux API)
      Signed-off-by: NMatt Johnston <matt@codeconstruct.com.au>
      Signed-off-by: NJeremy Kerr <jk@codeconstruct.com.au>
      Reviewed-by: Wolfram Sang <wsa@kernel.org> # I2C transport parts
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5b8abf9
  5. 19 2月, 2022 5 次提交
  6. 18 2月, 2022 11 次提交