Commit f3b97577 authored by John Hurley's avatar John Hurley Committed by David S. Miller

nfp: flower: tidy tunnel related private data

Recent additions to the flower app private data have grouped the variables
of a given feature into a struct and added that struct to the main private
data struct.

In keeping with this, move all tunnel related private data to their own
struct. This has no affect on functionality but improves readability and
maintenance of the code.
Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 467322e2
......@@ -56,6 +56,34 @@ struct nfp_fl_stats_id {
u8 repeated_em_count;
};
/**
* struct nfp_fl_tunnel_offloads - priv data for tunnel offloads
* @mac_off_list: List of MAC addresses to offload
* @mac_index_list: List of unique 8-bit indexes for non NFP netdevs
* @ipv4_off_list: List of IPv4 addresses to offload
* @neigh_off_list: List of neighbour offloads
* @mac_off_lock: Lock for the MAC address list
* @mac_index_lock: Lock for the MAC index list
* @ipv4_off_lock: Lock for the IPv4 address list
* @neigh_off_lock: Lock for the neighbour address list
* @mac_off_ids: IDA to manage id assignment for offloaded MACs
* @mac_off_count: Number of MACs in address list
* @neigh_nb: Notifier to monitor neighbour state
*/
struct nfp_fl_tunnel_offloads {
struct list_head mac_off_list;
struct list_head mac_index_list;
struct list_head ipv4_off_list;
struct list_head neigh_off_list;
struct mutex mac_off_lock;
struct mutex mac_index_lock;
struct mutex ipv4_off_lock;
spinlock_t neigh_off_lock;
struct ida mac_off_ids;
int mac_off_count;
struct notifier_block neigh_nb;
};
/**
* struct nfp_mtu_conf - manage MTU setting
* @portnum: NFP port number of repr with requested MTU change
......@@ -116,17 +144,7 @@ struct nfp_fl_lag {
* processing
* @cmsg_skbs_low: List of lower priority skbs for control message
* processing
* @nfp_mac_off_list: List of MAC addresses to offload
* @nfp_mac_index_list: List of unique 8-bit indexes for non NFP netdevs
* @nfp_ipv4_off_list: List of IPv4 addresses to offload
* @nfp_neigh_off_list: List of neighbour offloads
* @nfp_mac_off_lock: Lock for the MAC address list
* @nfp_mac_index_lock: Lock for the MAC index list
* @nfp_ipv4_off_lock: Lock for the IPv4 address list
* @nfp_neigh_off_lock: Lock for the neighbour address list
* @nfp_mac_off_ids: IDA to manage id assignment for offloaded macs
* @nfp_mac_off_count: Number of MACs in address list
* @nfp_tun_neigh_nb: Notifier to monitor neighbour state
* @tun: Tunnel offload data
* @reify_replies: atomically stores the number of replies received
* from firmware for repr reify
* @reify_wait_queue: wait queue for repr reify response counting
......@@ -152,17 +170,7 @@ struct nfp_flower_priv {
struct work_struct cmsg_work;
struct sk_buff_head cmsg_skbs_high;
struct sk_buff_head cmsg_skbs_low;
struct list_head nfp_mac_off_list;
struct list_head nfp_mac_index_list;
struct list_head nfp_ipv4_off_list;
struct list_head nfp_neigh_off_list;
struct mutex nfp_mac_off_lock;
struct mutex nfp_mac_index_lock;
struct mutex nfp_ipv4_off_lock;
spinlock_t nfp_neigh_off_lock;
struct ida nfp_mac_off_ids;
int nfp_mac_off_count;
struct notifier_block nfp_tun_neigh_nb;
struct nfp_fl_tunnel_offloads tun;
atomic_t reify_replies;
wait_queue_head_t reify_wait_queue;
struct nfp_mtu_conf mtu_conf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment