@@ -1063,7 +1063,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ADDADDR);
} else {
mptcp_pm_add_addr_echoed(msk, &mp_opt.addr);
- mptcp_pm_del_add_timer(msk, &mp_opt.addr);
+ mptcp_pm_del_anno_timer(msk, &mp_opt.addr);
MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ECHOADD);
}
@@ -31,10 +31,10 @@ struct mptcp_pm_addr_entry {
struct socket *lsk;
};
-struct mptcp_pm_add_entry {
+struct mptcp_pm_anno_entry {
struct list_head list;
struct mptcp_addr_info addr;
- struct timer_list add_timer;
+ struct timer_list anno_timer;
struct mptcp_sock *sock;
u8 retrans_times;
};
@@ -263,11 +263,11 @@ static void check_work_pending(struct mptcp_sock *msk)
WRITE_ONCE(msk->pm.work_pending, false);
}
-struct mptcp_pm_add_entry *
+struct mptcp_pm_anno_entry *
mptcp_lookup_anno_list_by_saddr(struct mptcp_sock *msk,
struct mptcp_addr_info *addr)
{
- struct mptcp_pm_add_entry *entry;
+ struct mptcp_pm_anno_entry *entry;
lockdep_assert_held(&msk->pm.lock);
@@ -281,7 +281,7 @@ mptcp_lookup_anno_list_by_saddr(struct mptcp_sock *msk,
bool mptcp_pm_sport_in_anno_list(struct mptcp_sock *msk, const struct sock *sk)
{
- struct mptcp_pm_add_entry *entry;
+ struct mptcp_pm_anno_entry *entry;
struct mptcp_addr_info saddr;
bool ret = false;
@@ -300,9 +300,9 @@ bool mptcp_pm_sport_in_anno_list(struct mptcp_sock *msk, const struct sock *sk)
return ret;
}
-static void mptcp_pm_add_timer(struct timer_list *timer)
+static void mptcp_pm_anno_timer(struct timer_list *timer)
{
- struct mptcp_pm_add_entry *entry = from_timer(entry, timer, add_timer);
+ struct mptcp_pm_anno_entry *entry = from_timer(entry, timer, anno_timer);
struct mptcp_sock *msk = entry->sock;
struct sock *sk = (struct sock *)msk;
@@ -344,11 +344,11 @@ static void mptcp_pm_add_timer(struct timer_list *timer)
__sock_put(sk);
}
-struct mptcp_pm_add_entry *
-mptcp_pm_del_add_timer(struct mptcp_sock *msk,
- struct mptcp_addr_info *addr)
+struct mptcp_pm_anno_entry *
+mptcp_pm_del_anno_timer(struct mptcp_sock *msk,
+ struct mptcp_addr_info *addr)
{
- struct mptcp_pm_add_entry *entry;
+ struct mptcp_pm_anno_entry *entry;
struct sock *sk = (struct sock *)msk;
spin_lock_bh(&msk->pm.lock);
@@ -358,7 +358,7 @@ mptcp_pm_del_add_timer(struct mptcp_sock *msk,
spin_unlock_bh(&msk->pm.lock);
if (entry)
- sk_stop_timer_sync(sk, &entry->add_timer);
+ sk_stop_timer_sync(sk, &entry->anno_timer);
return entry;
}
@@ -366,7 +366,7 @@ mptcp_pm_del_add_timer(struct mptcp_sock *msk,
static bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
struct mptcp_pm_addr_entry *entry)
{
- struct mptcp_pm_add_entry *add_entry = NULL;
+ struct mptcp_pm_anno_entry *anno_entry = NULL;
struct sock *sk = (struct sock *)msk;
struct net *net = sock_net(sk);
@@ -375,18 +375,18 @@ static bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
if (mptcp_lookup_anno_list_by_saddr(msk, &entry->addr))
return false;
- add_entry = kmalloc(sizeof(*add_entry), GFP_ATOMIC);
- if (!add_entry)
+ anno_entry = kmalloc(sizeof(*anno_entry), GFP_ATOMIC);
+ if (!anno_entry)
return false;
- list_add(&add_entry->list, &msk->pm.anno_list);
+ list_add(&anno_entry->list, &msk->pm.anno_list);
- add_entry->addr = entry->addr;
- add_entry->sock = msk;
- add_entry->retrans_times = 0;
+ anno_entry->addr = entry->addr;
+ anno_entry->sock = msk;
+ anno_entry->retrans_times = 0;
- timer_setup(&add_entry->add_timer, mptcp_pm_add_timer, 0);
- sk_reset_timer(sk, &add_entry->add_timer,
+ timer_setup(&anno_entry->anno_timer, mptcp_pm_anno_timer, 0);
+ sk_reset_timer(sk, &anno_entry->anno_timer,
jiffies + mptcp_get_add_addr_timeout(net));
return true;
@@ -394,7 +394,7 @@ static bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
void mptcp_pm_free_anno_list(struct mptcp_sock *msk)
{
- struct mptcp_pm_add_entry *entry, *tmp;
+ struct mptcp_pm_anno_entry *entry, *tmp;
struct sock *sk = (struct sock *)msk;
LIST_HEAD(free_list);
@@ -405,7 +405,7 @@ void mptcp_pm_free_anno_list(struct mptcp_sock *msk)
spin_unlock_bh(&msk->pm.lock);
list_for_each_entry_safe(entry, tmp, &free_list, list) {
- sk_stop_timer_sync(sk, &entry->add_timer);
+ sk_stop_timer_sync(sk, &entry->anno_timer);
kfree(entry);
}
}
@@ -1068,9 +1068,9 @@ __lookup_addr_by_id(struct pm_nl_pernet *pernet, unsigned int id)
static bool remove_anno_list_by_saddr(struct mptcp_sock *msk,
struct mptcp_addr_info *addr)
{
- struct mptcp_pm_add_entry *entry;
+ struct mptcp_pm_anno_entry *entry;
- entry = mptcp_pm_del_add_timer(msk, addr);
+ entry = mptcp_pm_del_anno_timer(msk, addr);
if (entry) {
list_del(&entry->list);
kfree(entry);
@@ -694,10 +694,10 @@ int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
u8 bkup);
void mptcp_pm_free_anno_list(struct mptcp_sock *msk);
bool mptcp_pm_sport_in_anno_list(struct mptcp_sock *msk, const struct sock *sk);
-struct mptcp_pm_add_entry *
-mptcp_pm_del_add_timer(struct mptcp_sock *msk,
- struct mptcp_addr_info *addr);
-struct mptcp_pm_add_entry *
+struct mptcp_pm_anno_entry *
+mptcp_pm_del_anno_timer(struct mptcp_sock *msk,
+ struct mptcp_addr_info *addr);
+struct mptcp_pm_anno_entry *
mptcp_lookup_anno_list_by_saddr(struct mptcp_sock *msk,
struct mptcp_addr_info *addr);
This patch renamed struct mptcp_pm_add_entry to mptcp_pm_anno_entry, since these entries will be added to the anno_list of PM. Also rename the struct member add_timer to anno_timer. Signed-off-by: Geliang Tang <geliangtang@gmail.com> --- net/mptcp/options.c | 2 +- net/mptcp/pm_netlink.c | 50 +++++++++++++++++++++--------------------- net/mptcp/protocol.h | 8 +++---- 3 files changed, 30 insertions(+), 30 deletions(-)