Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflict resolution of ice_virtchnl_pf.c based upon work by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -179,7 +179,8 @@ struct vport *ovs_lookup_vport(const struct datapath *dp, u16 port_no)
|
||||
struct hlist_head *head;
|
||||
|
||||
head = vport_hash_bucket(dp, port_no);
|
||||
hlist_for_each_entry_rcu(vport, head, dp_hash_node) {
|
||||
hlist_for_each_entry_rcu(vport, head, dp_hash_node,
|
||||
lockdep_ovsl_is_held()) {
|
||||
if (vport->port_no == port_no)
|
||||
return vport;
|
||||
}
|
||||
@@ -2042,7 +2043,8 @@ static unsigned int ovs_get_max_headroom(struct datapath *dp)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DP_VPORT_HASH_BUCKETS; i++) {
|
||||
hlist_for_each_entry_rcu(vport, &dp->ports[i], dp_hash_node) {
|
||||
hlist_for_each_entry_rcu(vport, &dp->ports[i], dp_hash_node,
|
||||
lockdep_ovsl_is_held()) {
|
||||
dev = vport->dev;
|
||||
dev_headroom = netdev_get_fwd_headroom(dev);
|
||||
if (dev_headroom > max_headroom)
|
||||
@@ -2061,7 +2063,8 @@ static void ovs_update_headroom(struct datapath *dp, unsigned int new_headroom)
|
||||
|
||||
dp->max_headroom = new_headroom;
|
||||
for (i = 0; i < DP_VPORT_HASH_BUCKETS; i++)
|
||||
hlist_for_each_entry_rcu(vport, &dp->ports[i], dp_hash_node)
|
||||
hlist_for_each_entry_rcu(vport, &dp->ports[i], dp_hash_node,
|
||||
lockdep_ovsl_is_held())
|
||||
netdev_set_rx_headroom(vport->dev, new_headroom);
|
||||
}
|
||||
|
||||
|
@@ -2742,10 +2742,6 @@ static int validate_set(const struct nlattr *a,
|
||||
return -EINVAL;
|
||||
|
||||
switch (key_type) {
|
||||
const struct ovs_key_ipv4 *ipv4_key;
|
||||
const struct ovs_key_ipv6 *ipv6_key;
|
||||
int err;
|
||||
|
||||
case OVS_KEY_ATTR_PRIORITY:
|
||||
case OVS_KEY_ATTR_SKB_MARK:
|
||||
case OVS_KEY_ATTR_CT_MARK:
|
||||
@@ -2757,7 +2753,9 @@ static int validate_set(const struct nlattr *a,
|
||||
return -EINVAL;
|
||||
break;
|
||||
|
||||
case OVS_KEY_ATTR_TUNNEL:
|
||||
case OVS_KEY_ATTR_TUNNEL: {
|
||||
int err;
|
||||
|
||||
if (masked)
|
||||
return -EINVAL; /* Masked tunnel set not supported. */
|
||||
|
||||
@@ -2766,8 +2764,10 @@ static int validate_set(const struct nlattr *a,
|
||||
if (err)
|
||||
return err;
|
||||
break;
|
||||
}
|
||||
case OVS_KEY_ATTR_IPV4: {
|
||||
const struct ovs_key_ipv4 *ipv4_key;
|
||||
|
||||
case OVS_KEY_ATTR_IPV4:
|
||||
if (eth_type != htons(ETH_P_IP))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2787,8 +2787,10 @@ static int validate_set(const struct nlattr *a,
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OVS_KEY_ATTR_IPV6: {
|
||||
const struct ovs_key_ipv6 *ipv6_key;
|
||||
|
||||
case OVS_KEY_ATTR_IPV6:
|
||||
if (eth_type != htons(ETH_P_IPV6))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2815,7 +2817,7 @@ static int validate_set(const struct nlattr *a,
|
||||
return -EINVAL;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
case OVS_KEY_ATTR_TCP:
|
||||
if ((eth_type != htons(ETH_P_IP) &&
|
||||
eth_type != htons(ETH_P_IPV6)) ||
|
||||
|
@@ -585,7 +585,8 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
|
||||
head = find_bucket(ti, hash);
|
||||
(*n_mask_hit)++;
|
||||
|
||||
hlist_for_each_entry_rcu(flow, head, flow_table.node[ti->node_ver]) {
|
||||
hlist_for_each_entry_rcu(flow, head, flow_table.node[ti->node_ver],
|
||||
lockdep_ovsl_is_held()) {
|
||||
if (flow->mask == mask && flow->flow_table.hash == hash &&
|
||||
flow_cmp_masked_key(flow, &masked_key, &mask->range))
|
||||
return flow;
|
||||
@@ -769,7 +770,8 @@ struct sw_flow *ovs_flow_tbl_lookup_ufid(struct flow_table *tbl,
|
||||
|
||||
hash = ufid_hash(ufid);
|
||||
head = find_bucket(ti, hash);
|
||||
hlist_for_each_entry_rcu(flow, head, ufid_table.node[ti->node_ver]) {
|
||||
hlist_for_each_entry_rcu(flow, head, ufid_table.node[ti->node_ver],
|
||||
lockdep_ovsl_is_held()) {
|
||||
if (flow->ufid_table.hash == hash &&
|
||||
ovs_flow_cmp_ufid(flow, ufid))
|
||||
return flow;
|
||||
|
@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp,
|
||||
struct hlist_head *head;
|
||||
|
||||
head = meter_hash_bucket(dp, meter_id);
|
||||
hlist_for_each_entry_rcu(meter, head, dp_hash_node) {
|
||||
hlist_for_each_entry_rcu(meter, head, dp_hash_node,
|
||||
lockdep_ovsl_is_held()) {
|
||||
if (meter->id == meter_id)
|
||||
return meter;
|
||||
}
|
||||
|
@@ -96,7 +96,8 @@ struct vport *ovs_vport_locate(const struct net *net, const char *name)
|
||||
struct hlist_head *bucket = hash_bucket(net, name);
|
||||
struct vport *vport;
|
||||
|
||||
hlist_for_each_entry_rcu(vport, bucket, hash_node)
|
||||
hlist_for_each_entry_rcu(vport, bucket, hash_node,
|
||||
lockdep_ovsl_is_held())
|
||||
if (!strcmp(name, ovs_vport_name(vport)) &&
|
||||
net_eq(ovs_dp_get_net(vport->dp), net))
|
||||
return vport;
|
||||
|
Reference in New Issue
Block a user