View | Details | Raw Unified | Return to bug 7
Collapse All | Expand All

(-)a/drivers/net/mlx4/mlx4_flow.c (-8 / +8 lines)
Lines 1223-1231 struct mlx4_drop { Link Here
1223
 *
1223
 *
1224
 * Various flow rules are created depending on the mode the device is in:
1224
 * Various flow rules are created depending on the mode the device is in:
1225
 *
1225
 *
1226
 * 1. Promiscuous: port MAC + catch-all (VLAN filtering is ignored).
1226
 * 1. Promiscuous:
1227
 * 2. All multicast: port MAC/VLAN + catch-all multicast.
1227
 *       port MAC + broadcast + catch-all (VLAN filtering is ignored).
1228
 * 3. Otherwise: port MAC/VLAN + broadcast MAC/VLAN.
1228
 * 2. All multicast:
1229
 *       port MAC/VLAN + broadcast + catch-all multicast.
1230
 * 3. Otherwise:
1231
 *       port MAC/VLAN + broadcast MAC/VLAN.
1229
 *
1232
 *
1230
 * About MAC flow rules:
1233
 * About MAC flow rules:
1231
 *
1234
 *
Lines 1304-1312 struct mlx4_drop { Link Here
1304
		!priv->dev->data->promiscuous ?
1307
		!priv->dev->data->promiscuous ?
1305
		&vlan_spec.tci :
1308
		&vlan_spec.tci :
1306
		NULL;
1309
		NULL;
1307
	int broadcast =
1308
		!priv->dev->data->promiscuous &&
1309
		!priv->dev->data->all_multicast;
1310
	uint16_t vlan = 0;
1310
	uint16_t vlan = 0;
1311
	struct rte_flow *flow;
1311
	struct rte_flow *flow;
1312
	unsigned int i;
1312
	unsigned int i;
Lines 1340-1346 struct mlx4_drop { Link Here
1340
			rule_vlan = NULL;
1340
			rule_vlan = NULL;
1341
		}
1341
		}
1342
	}
1342
	}
1343
	for (i = 0; i != RTE_DIM(priv->mac) + broadcast; ++i) {
1343
	for (i = 0; i != RTE_DIM(priv->mac) + 1; ++i) {
1344
		const struct ether_addr *mac;
1344
		const struct ether_addr *mac;
1345
1345
1346
		/* Broadcasts are handled by an extra iteration. */
1346
		/* Broadcasts are handled by an extra iteration. */
Lines 1404-1410 struct mlx4_drop { Link Here
1404
			goto next_vlan;
1404
			goto next_vlan;
1405
	}
1405
	}
1406
	/* Take care of promiscuous and all multicast flow rules. */
1406
	/* Take care of promiscuous and all multicast flow rules. */
1407
	if (!broadcast) {
1407
	if (priv->dev->data->promiscuous || priv->dev->data->all_multicast) {
1408
		for (flow = LIST_FIRST(&priv->flows);
1408
		for (flow = LIST_FIRST(&priv->flows);
1409
		     flow && flow->internal;
1409
		     flow && flow->internal;
1410
		     flow = LIST_NEXT(flow, next)) {
1410
		     flow = LIST_NEXT(flow, next)) {

Return to bug 7