Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux-backend-4.9.5
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pacer
linux-backend-4.9.5
Commits
103229a3
Commit
103229a3
authored
5 years ago
by
Aastha Mehta
Browse files
Options
Downloads
Patches
Plain Diff
disable IP ID in real packets
parent
276227e6
Branches
xenpacer-crypto
xenpacer-cwnd
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
net/ipv4/ip_output.c
+21
-0
21 additions, 0 deletions
net/ipv4/ip_output.c
with
21 additions
and
0 deletions
net/ipv4/ip_output.c
+
21
−
0
View file @
103229a3
...
@@ -79,6 +79,9 @@
...
@@ -79,6 +79,9 @@
#include
<linux/netfilter_bridge.h>
#include
<linux/netfilter_bridge.h>
#include
<linux/netlink.h>
#include
<linux/netlink.h>
#include
<linux/tcp.h>
#include
<linux/tcp.h>
#if defined(CONFIG_PACER_TCP)
#include
"../../../drivers/net/ethernet/broadcom/bnx2x/sme/ptcp_hooks.h"
#endif
static
int
static
int
ip_fragment
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
ip_fragment
(
struct
net
*
net
,
struct
sock
*
sk
,
struct
sk_buff
*
skb
,
...
@@ -146,6 +149,9 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
...
@@ -146,6 +149,9 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
struct
rtable
*
rt
=
skb_rtable
(
skb
);
struct
rtable
*
rt
=
skb_rtable
(
skb
);
struct
net
*
net
=
sock_net
(
sk
);
struct
net
*
net
=
sock_net
(
sk
);
struct
iphdr
*
iph
;
struct
iphdr
*
iph
;
#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP)
int
paced_ret
=
ptcp_is_paced_flow
((
struct
sock
*
)
sk
);
#endif
/* Build the IP header. */
/* Build the IP header. */
skb_push
(
skb
,
sizeof
(
struct
iphdr
)
+
(
opt
?
opt
->
opt
.
optlen
:
0
));
skb_push
(
skb
,
sizeof
(
struct
iphdr
)
+
(
opt
?
opt
->
opt
.
optlen
:
0
));
...
@@ -166,6 +172,12 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
...
@@ -166,6 +172,12 @@ int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
__ip_select_ident
(
net
,
iph
,
1
);
__ip_select_ident
(
net
,
iph
,
1
);
}
}
#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP)
if
(
paced_ret
==
0
)
{
iph
->
id
=
0
;
}
#endif
if
(
opt
&&
opt
->
opt
.
optlen
)
{
if
(
opt
&&
opt
->
opt
.
optlen
)
{
iph
->
ihl
+=
opt
->
opt
.
optlen
>>
2
;
iph
->
ihl
+=
opt
->
opt
.
optlen
>>
2
;
ip_options_build
(
skb
,
&
opt
->
opt
,
daddr
,
rt
,
0
);
ip_options_build
(
skb
,
&
opt
->
opt
,
daddr
,
rt
,
0
);
...
@@ -406,6 +418,9 @@ int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl)
...
@@ -406,6 +418,9 @@ int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl)
struct
rtable
*
rt
;
struct
rtable
*
rt
;
struct
iphdr
*
iph
;
struct
iphdr
*
iph
;
int
res
;
int
res
;
#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP)
int
paced_ret
=
ptcp_is_paced_flow
(
sk
);
#endif
/* Skip all of this if the packet is already routed,
/* Skip all of this if the packet is already routed,
* f.e. by something like SCTP.
* f.e. by something like SCTP.
...
@@ -471,6 +486,12 @@ packet_routed:
...
@@ -471,6 +486,12 @@ packet_routed:
ip_select_ident_segs
(
net
,
skb
,
sk
,
ip_select_ident_segs
(
net
,
skb
,
sk
,
skb_shinfo
(
skb
)
->
gso_segs
?:
1
);
skb_shinfo
(
skb
)
->
gso_segs
?:
1
);
#if defined(CONFIG_XEN_SME) && defined(CONFIG_PACER_TCP)
if
(
paced_ret
==
0
)
{
iph
->
id
=
0
;
}
#endif
/* TODO : should we use skb->sk here instead of sk ? */
/* TODO : should we use skb->sk here instead of sk ? */
skb
->
priority
=
sk
->
sk_priority
;
skb
->
priority
=
sk
->
sk_priority
;
skb
->
mark
=
sk
->
sk_mark
;
skb
->
mark
=
sk
->
sk_mark
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment