Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 815c7db5 authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

ethtool: Clean up definitions of rule location arrays in RX NFC



Correct the description of ethtool_rxnfc::rule_locs; it is an array
of currently used locations, not all possible valid locations.

Add note that drivers must not use ethtool_rxnfc::rule_locs.

The rule_locs argument to ethtool_ops::get_rxnfc is either NULL or a
pointer to an array of u32, so change the parameter type accordingly.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 434495c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2241,7 +2241,7 @@ static int bnx2x_set_phys_id(struct net_device *dev,
}
}


static int bnx2x_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
static int bnx2x_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
			   void *rules __always_unused)
			   u32 *rules __always_unused)
{
{
	struct bnx2x *bp = netdev_priv(dev);
	struct bnx2x *bp = netdev_priv(dev);


+1 −1
Original line number Original line Diff line number Diff line
@@ -1902,7 +1902,7 @@ static int set_rss_table(struct net_device *dev,
}
}


static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
		     void *rules)
		     u32 *rules)
{
{
	const struct port_info *pi = netdev_priv(dev);
	const struct port_info *pi = netdev_priv(dev);


+2 −2
Original line number Original line Diff line number Diff line
@@ -1712,7 +1712,7 @@ static int gfar_set_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
}
}


static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
		void *rule_locs)
		u32 *rule_locs)
{
{
	struct gfar_private *priv = netdev_priv(dev);
	struct gfar_private *priv = netdev_priv(dev);
	int ret = 0;
	int ret = 0;
@@ -1728,7 +1728,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
		ret = gfar_get_cls(priv, cmd);
		ret = gfar_get_cls(priv, cmd);
		break;
		break;
	case ETHTOOL_GRXCLSRLALL:
	case ETHTOOL_GRXCLSRLALL:
		ret = gfar_get_cls_all(priv, cmd, (u32 *) rule_locs);
		ret = gfar_get_cls_all(priv, cmd, rule_locs);
		break;
		break;
	default:
	default:
		ret = -EINVAL;
		ret = -EINVAL;
+2 −3
Original line number Original line Diff line number Diff line
@@ -2287,7 +2287,7 @@ static int ixgbe_get_ethtool_fdir_all(struct ixgbe_adapter *adapter,
}
}


static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
			   void *rule_locs)
			   u32 *rule_locs)
{
{
	struct ixgbe_adapter *adapter = netdev_priv(dev);
	struct ixgbe_adapter *adapter = netdev_priv(dev);
	int ret = -EOPNOTSUPP;
	int ret = -EOPNOTSUPP;
@@ -2305,8 +2305,7 @@ static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
		ret = ixgbe_get_ethtool_fdir_entry(adapter, cmd);
		ret = ixgbe_get_ethtool_fdir_entry(adapter, cmd);
		break;
		break;
	case ETHTOOL_GRXCLSRLALL:
	case ETHTOOL_GRXCLSRLALL:
		ret = ixgbe_get_ethtool_fdir_all(adapter, cmd,
		ret = ixgbe_get_ethtool_fdir_all(adapter, cmd, rule_locs);
						 (u32 *)rule_locs);
		break;
		break;
	default:
	default:
		break;
		break;
+1 −1
Original line number Original line Diff line number Diff line
@@ -824,7 +824,7 @@ static int efx_ethtool_reset(struct net_device *net_dev, u32 *flags)


static int
static int
efx_ethtool_get_rxnfc(struct net_device *net_dev,
efx_ethtool_get_rxnfc(struct net_device *net_dev,
		      struct ethtool_rxnfc *info, void *rules __always_unused)
		      struct ethtool_rxnfc *info, u32 *rules __always_unused)
{
{
	struct efx_nic *efx = netdev_priv(net_dev);
	struct efx_nic *efx = netdev_priv(net_dev);


Loading