key->ip.tos = ipv6_get_dsfield(nh);
key->ip.ttl = nh->hop_limit;
key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL);
key->ip.tos = ipv6_get_dsfield(nh);
key->ip.ttl = nh->hop_limit;
key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL);
- ipv6_addr_copy(&key->ipv6.addr.src, &nh->saddr);
- ipv6_addr_copy(&key->ipv6.addr.dst, &nh->daddr);
+ key->ipv6.addr.src = nh->saddr;
+ key->ipv6.addr.dst = nh->daddr;
payload_ofs = skip_exthdr(skb, payload_ofs, &nexthdr, &key->ip.frag);
if (unlikely(payload_ofs < 0))
payload_ofs = skip_exthdr(skb, payload_ofs, &nexthdr, &key->ip.frag);
if (unlikely(payload_ofs < 0))
{
return flex_array_get(table->buckets,
(hash & (table->n_buckets - 1)));
}
{
return flex_array_get(table->buckets,
(hash & (table->n_buckets - 1)));
}
hlist_for_each_entry_safe(flow, n, pos, head, hash_node) {
hlist_del_init_rcu(&flow->hash_node);
hlist_for_each_entry_safe(flow, n, pos, head, hash_node) {
hlist_del_init_rcu(&flow->hash_node);
static void rcu_free_flow_callback(struct rcu_head *rcu)
{
struct sw_flow *flow = container_of(rcu, struct sw_flow, rcu);
flow->dead = true;
static void rcu_free_flow_callback(struct rcu_head *rcu)
{
struct sw_flow *flow = container_of(rcu, struct sw_flow, rcu);
flow->dead = true;
}
/* Schedules 'flow' to be freed after the next RCU grace period.
* The caller must hold rcu_read_lock for this to be sensible. */
}
/* Schedules 'flow' to be freed after the next RCU grace period.
* The caller must hold rcu_read_lock for this to be sensible. */
static void rcu_free_acts_callback(struct rcu_head *rcu)
{
struct sw_flow_actions *sf_acts = container_of(rcu,
static void rcu_free_acts_callback(struct rcu_head *rcu)
{
struct sw_flow_actions *sf_acts = container_of(rcu,
/* Schedules 'sf_acts' to be freed after the next RCU grace period.
* The caller must hold rcu_read_lock for this to be sensible. */
/* Schedules 'sf_acts' to be freed after the next RCU grace period.
* The caller must hold rcu_read_lock for this to be sensible. */
* @skb: sk_buff that contains the frame, with skb->data pointing to the
* Ethernet header
* @in_port: port number on which @skb was received.
* @skb: sk_buff that contains the frame, with skb->data pointing to the
* Ethernet header
* @in_port: port number on which @skb was received.
* of a correct length, otherwise the same as skb->network_header.
* For other key->dl_type values it is left untouched.
*/
* of a correct length, otherwise the same as skb->network_header.
* For other key->dl_type values it is left untouched.
*/
-int flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
+int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
{
return jhash2((u32 *)key, DIV_ROUND_UP(key_len, sizeof(u32)), hash_seed);
}
{
return jhash2((u32 *)key, DIV_ROUND_UP(key_len, sizeof(u32)), hash_seed);
}
head = find_bucket(table, hash);
hlist_for_each_entry_rcu(flow, n, head, hash_node) {
head = find_bucket(table, hash);
hlist_for_each_entry_rcu(flow, n, head, hash_node) {
* @swkey: receives the extracted flow key.
* @key_lenp: number of bytes used in @swkey.
* @attr: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute
* sequence.
*/
* @swkey: receives the extracted flow key.
* @key_lenp: number of bytes used in @swkey.
* @attr: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute
* sequence.
*/
* @in_port: receives the extracted input port.
* @tun_id: receives the extracted tunnel ID.
* @key: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute
* @in_port: receives the extracted input port.
* @tun_id: receives the extracted tunnel ID.
* @key: Netlink attribute holding nested %OVS_KEY_ATTR_* Netlink attribute
* get the metadata, that is, the parts of the flow key that cannot be
* extracted from the packet itself.
*/
* get the metadata, that is, the parts of the flow key that cannot be
* extracted from the packet itself.
*/
-int flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
- const struct nlattr *attr)
+int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
+ const struct nlattr *attr)
{
struct ovs_key_ethernet *eth_key;
struct nlattr *nla, *encap;
{
struct ovs_key_ethernet *eth_key;
struct nlattr *nla, *encap;
{
flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow), 0,
0, NULL);
{
flow_cache = kmem_cache_create("sw_flow", sizeof(struct sw_flow), 0,
0, NULL);