mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
Merge branch 'ipv4-prepare-core-ipv4-files-to-future-flowi4_tos-conversion'
Guillaume Nault says: ==================== ipv4: Prepare core ipv4 files to future .flowi4_tos conversion. Continue preparing users of ->flowi4_tos (struct flowi4) to the future conversion of this field (from __u8 to dscp_t). The objective is to have type annotation to properly separate DSCP bits from ECN ones. This way we'll ensure that ECN doesn't interfere with DSCP and avoid regressions where it break routing descisions (fib rules in particular). This series concentrates on some easy IPv4 conversions where ->flowi4_tos is set directly from an IPv4 header, so we can get the DSCP value using the ip4h_dscp() helper function. ==================== Link: https://patch.msgid.link/cover.1729530028.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
25c509f483
|
|
@ -293,7 +293,7 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)
|
|||
.flowi4_iif = LOOPBACK_IFINDEX,
|
||||
.flowi4_l3mdev = l3mdev_master_ifindex_rcu(dev),
|
||||
.daddr = ip_hdr(skb)->saddr,
|
||||
.flowi4_tos = ip_hdr(skb)->tos & INET_DSCP_MASK,
|
||||
.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip_hdr(skb))),
|
||||
.flowi4_scope = scope,
|
||||
.flowi4_mark = vmark ? skb->mark : 0,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -445,7 +445,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb)
|
|||
fl4.saddr = saddr;
|
||||
fl4.flowi4_mark = mark;
|
||||
fl4.flowi4_uid = sock_net_uid(net, NULL);
|
||||
fl4.flowi4_tos = ip_hdr(skb)->tos & INET_DSCP_MASK;
|
||||
fl4.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip_hdr(skb)));
|
||||
fl4.flowi4_proto = IPPROTO_ICMP;
|
||||
fl4.flowi4_oif = l3mdev_master_ifindex(skb->dev);
|
||||
security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4));
|
||||
|
|
|
|||
|
|
@ -2081,7 +2081,7 @@ static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb)
|
|||
struct flowi4 fl4 = {
|
||||
.daddr = iph->daddr,
|
||||
.saddr = iph->saddr,
|
||||
.flowi4_tos = iph->tos & INET_DSCP_MASK,
|
||||
.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(iph)),
|
||||
.flowi4_oif = (rt_is_output_route(rt) ?
|
||||
skb->dev->ifindex : 0),
|
||||
.flowi4_iif = (rt_is_output_route(rt) ?
|
||||
|
|
|
|||
|
|
@ -1263,7 +1263,7 @@ void ip_rt_get_source(u8 *addr, struct sk_buff *skb, struct rtable *rt)
|
|||
struct flowi4 fl4 = {
|
||||
.daddr = iph->daddr,
|
||||
.saddr = iph->saddr,
|
||||
.flowi4_tos = iph->tos & INET_DSCP_MASK,
|
||||
.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(iph)),
|
||||
.flowi4_oif = rt->dst.dev->ifindex,
|
||||
.flowi4_iif = skb->dev->ifindex,
|
||||
.flowi4_mark = skb->mark,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user