Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor comment merge conflict in mlx5. Staging driver has a fixup due to the skb->xmit_more changes in 'net-next', but was removed in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -257,11 +257,10 @@ int ip_local_deliver(struct sk_buff *skb)
|
||||
ip_local_deliver_finish);
|
||||
}
|
||||
|
||||
static inline bool ip_rcv_options(struct sk_buff *skb)
|
||||
static inline bool ip_rcv_options(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct ip_options *opt;
|
||||
const struct iphdr *iph;
|
||||
struct net_device *dev = skb->dev;
|
||||
|
||||
/* It looks as overkill, because not all
|
||||
IP options require packet mangling.
|
||||
@@ -297,7 +296,7 @@ static inline bool ip_rcv_options(struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
if (ip_options_rcv_srr(skb))
|
||||
if (ip_options_rcv_srr(skb, dev))
|
||||
goto drop;
|
||||
}
|
||||
|
||||
@@ -353,7 +352,7 @@ static int ip_rcv_finish_core(struct net *net, struct sock *sk,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (iph->ihl > 5 && ip_rcv_options(skb))
|
||||
if (iph->ihl > 5 && ip_rcv_options(skb, dev))
|
||||
goto drop;
|
||||
|
||||
rt = skb_rtable(skb);
|
||||
|
@@ -612,7 +612,7 @@ void ip_forward_options(struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
int ip_options_rcv_srr(struct sk_buff *skb)
|
||||
int ip_options_rcv_srr(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct ip_options *opt = &(IPCB(skb)->opt);
|
||||
int srrspace, srrptr;
|
||||
@@ -647,7 +647,7 @@ int ip_options_rcv_srr(struct sk_buff *skb)
|
||||
|
||||
orefdst = skb->_skb_refdst;
|
||||
skb_dst_set(skb, NULL);
|
||||
err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, skb->dev);
|
||||
err = ip_route_input(skb, nexthop, iph->saddr, iph->tos, dev);
|
||||
rt2 = skb_rtable(skb);
|
||||
if (err || (rt2->rt_type != RTN_UNICAST && rt2->rt_type != RTN_LOCAL)) {
|
||||
skb_dst_drop(skb);
|
||||
|
@@ -67,11 +67,6 @@ static unsigned int dctcp_alpha_on_init __read_mostly = DCTCP_MAX_ALPHA;
|
||||
module_param(dctcp_alpha_on_init, uint, 0644);
|
||||
MODULE_PARM_DESC(dctcp_alpha_on_init, "parameter for initial alpha value");
|
||||
|
||||
static unsigned int dctcp_clamp_alpha_on_loss __read_mostly;
|
||||
module_param(dctcp_clamp_alpha_on_loss, uint, 0644);
|
||||
MODULE_PARM_DESC(dctcp_clamp_alpha_on_loss,
|
||||
"parameter for clamping alpha on loss");
|
||||
|
||||
static struct tcp_congestion_ops dctcp_reno;
|
||||
|
||||
static void dctcp_reset(const struct tcp_sock *tp, struct dctcp *ca)
|
||||
@@ -164,21 +159,23 @@ static void dctcp_update_alpha(struct sock *sk, u32 flags)
|
||||
}
|
||||
}
|
||||
|
||||
static void dctcp_react_to_loss(struct sock *sk)
|
||||
{
|
||||
struct dctcp *ca = inet_csk_ca(sk);
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
|
||||
ca->loss_cwnd = tp->snd_cwnd;
|
||||
tp->snd_ssthresh = max(tp->snd_cwnd >> 1U, 2U);
|
||||
}
|
||||
|
||||
static void dctcp_state(struct sock *sk, u8 new_state)
|
||||
{
|
||||
if (dctcp_clamp_alpha_on_loss && new_state == TCP_CA_Loss) {
|
||||
struct dctcp *ca = inet_csk_ca(sk);
|
||||
|
||||
/* If this extension is enabled, we clamp dctcp_alpha to
|
||||
* max on packet loss; the motivation is that dctcp_alpha
|
||||
* is an indicator to the extend of congestion and packet
|
||||
* loss is an indicator of extreme congestion; setting
|
||||
* this in practice turned out to be beneficial, and
|
||||
* effectively assumes total congestion which reduces the
|
||||
* window by half.
|
||||
*/
|
||||
ca->dctcp_alpha = DCTCP_MAX_ALPHA;
|
||||
}
|
||||
if (new_state == TCP_CA_Recovery &&
|
||||
new_state != inet_csk(sk)->icsk_ca_state)
|
||||
dctcp_react_to_loss(sk);
|
||||
/* We handle RTO in dctcp_cwnd_event to ensure that we perform only
|
||||
* one loss-adjustment per RTT.
|
||||
*/
|
||||
}
|
||||
|
||||
static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
|
||||
@@ -190,6 +187,9 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)
|
||||
case CA_EVENT_ECN_NO_CE:
|
||||
dctcp_ece_ack_update(sk, ev, &ca->prior_rcv_nxt, &ca->ce_state);
|
||||
break;
|
||||
case CA_EVENT_LOSS:
|
||||
dctcp_react_to_loss(sk);
|
||||
break;
|
||||
default:
|
||||
/* Don't care for the rest. */
|
||||
break;
|
||||
|
@@ -2585,7 +2585,8 @@ static void __net_exit tcp_sk_exit(struct net *net)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
module_put(net->ipv4.tcp_congestion_control->owner);
|
||||
if (net->ipv4.tcp_congestion_control)
|
||||
module_put(net->ipv4.tcp_congestion_control->owner);
|
||||
|
||||
for_each_possible_cpu(cpu)
|
||||
inet_ctl_sock_destroy(*per_cpu_ptr(net->ipv4.tcp_sk, cpu));
|
||||
|
Reference in New Issue
Block a user