Commit dc84bb19 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'dpaa2-switch-various-fixes'

Ioana Ciornei says:

====================
dpaa2-switch: various fixes

The first patch fixes the size passed to two dma_unmap_single() calls
which was wrongly put as the size of the pointer.

The second patch is new to this series and reverts the behavior of the
dpaa2-switch driver to not ask for object replay upon offloading so that
we avoid the errors encountered when a VLAN is installed multiple times
on the same port.
====================

Link: https://lore.kernel.org/r/20231212164326.2753457-1-ioana.ciornei@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 23d05d56 f24a49a3
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -139,7 +139,8 @@ int dpaa2_switch_acl_entry_add(struct dpaa2_switch_filter_block *filter_block,
	err = dpsw_acl_add_entry(ethsw->mc_io, 0, ethsw->dpsw_handle,
				 filter_block->acl_id, acl_entry_cfg);

	dma_unmap_single(dev, acl_entry_cfg->key_iova, sizeof(cmd_buff),
	dma_unmap_single(dev, acl_entry_cfg->key_iova,
			 DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE,
			 DMA_TO_DEVICE);
	if (err) {
		dev_err(dev, "dpsw_acl_add_entry() failed %d\n", err);
@@ -181,8 +182,8 @@ dpaa2_switch_acl_entry_remove(struct dpaa2_switch_filter_block *block,
	err = dpsw_acl_remove_entry(ethsw->mc_io, 0, ethsw->dpsw_handle,
				    block->acl_id, acl_entry_cfg);

	dma_unmap_single(dev, acl_entry_cfg->key_iova, sizeof(cmd_buff),
			 DMA_TO_DEVICE);
	dma_unmap_single(dev, acl_entry_cfg->key_iova,
			 DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE, DMA_TO_DEVICE);
	if (err) {
		dev_err(dev, "dpsw_acl_remove_entry() failed %d\n", err);
		kfree(cmd_buff);
+2 −9
Original line number Diff line number Diff line
@@ -1998,9 +1998,6 @@ static int dpaa2_switch_port_attr_set_event(struct net_device *netdev,
	return notifier_from_errno(err);
}

static struct notifier_block dpaa2_switch_port_switchdev_nb;
static struct notifier_block dpaa2_switch_port_switchdev_blocking_nb;

static int dpaa2_switch_port_bridge_join(struct net_device *netdev,
					 struct net_device *upper_dev,
					 struct netlink_ext_ack *extack)
@@ -2043,9 +2040,7 @@ static int dpaa2_switch_port_bridge_join(struct net_device *netdev,
		goto err_egress_flood;

	err = switchdev_bridge_port_offload(netdev, netdev, NULL,
					    &dpaa2_switch_port_switchdev_nb,
					    &dpaa2_switch_port_switchdev_blocking_nb,
					    false, extack);
					    NULL, NULL, false, extack);
	if (err)
		goto err_switchdev_offload;

@@ -2079,9 +2074,7 @@ static int dpaa2_switch_port_restore_rxvlan(struct net_device *vdev, int vid, vo

static void dpaa2_switch_port_pre_bridge_leave(struct net_device *netdev)
{
	switchdev_bridge_port_unoffload(netdev, NULL,
					&dpaa2_switch_port_switchdev_nb,
					&dpaa2_switch_port_switchdev_blocking_nb);
	switchdev_bridge_port_unoffload(netdev, NULL, NULL, NULL);
}

static int dpaa2_switch_port_bridge_leave(struct net_device *netdev)