From b2238d95e548559ec126ffbd520ff2db25bc4f4b Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Tue, 2 Aug 2022 14:36:01 +0900 Subject: restarting on master=5.19 with rhe patches v7 --- debian/changelog | 8 +++ debian/config/defines | 2 +- ...ssector-dissect-into-ip-ipv6-header-insid.patch | 79 ++++++++++++++++++++++ debian/patches/series | 3 + 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 debian/patches/rhe/0001-net-flow_dissector-dissect-into-ip-ipv6-header-insid.patch (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f75a9e2c7..9ced5f82a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +linux (5.19-1~rhe0+7) UNRELEASED; urgency=medium + + * Based on 0d8e318c76e ("Merge branch 'sid'", 2022-08-01, master) + * Adjusted configs: debian/changelog and debian/config/defines + * Added RHE patches (v7 - no changes from 5.16.0-rhe0) + + -- Kazuki Yamaguchi Tue, 02 Aug 2022 14:34:48 +0900 + linux (5.19-1~exp1) UNRELEASED; urgency=medium * New upstream release: https://kernelnewbies.org/Linux_5.19 diff --git a/debian/config/defines b/debian/config/defines index 0d0697432..4739564d1 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -1,5 +1,5 @@ [abi] -abiname: trunk +abiname: rhe0 ignore-changes: __cpuhp_* __udp_gso_segment diff --git a/debian/patches/rhe/0001-net-flow_dissector-dissect-into-ip-ipv6-header-insid.patch b/debian/patches/rhe/0001-net-flow_dissector-dissect-into-ip-ipv6-header-insid.patch new file mode 100644 index 000000000..c330deeb1 --- /dev/null +++ b/debian/patches/rhe/0001-net-flow_dissector-dissect-into-ip-ipv6-header-insid.patch @@ -0,0 +1,79 @@ +From dfc382e84f6cdc44665f566d0076e4260e8b1615 Mon Sep 17 00:00:00 2001 +From: Kazuki Yamaguchi +Date: Sun, 6 Sep 2020 04:46:10 +0900 +Subject: [PATCH] net/flow_dissector: dissect into ip/ipv6 header inside MPLS + +--- + net/core/flow_dissector.c | 27 ++++++++++++++++++++++----- + 1 file changed, 22 insertions(+), 5 deletions(-) + +diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c +index 6aee04f75e3e..d115968893b4 100644 +--- a/net/core/flow_dissector.c ++++ b/net/core/flow_dissector.c +@@ -413,9 +413,9 @@ static enum flow_dissect_ret + __skb_flow_dissect_mpls(const struct sk_buff *skb, + struct flow_dissector *flow_dissector, + void *target_container, const void *data, int nhoff, +- int hlen, int lse_index, bool *entropy_label) ++ int hlen, int lse_index, bool *entropy_label, __be16 *proto) + { +- struct mpls_label *hdr, _hdr; ++ struct mpls_label *hdr, _hdr[2]; + u32 entry, label, bos; + + if (!dissector_uses_key(flow_dissector, +@@ -431,7 +431,7 @@ __skb_flow_dissect_mpls(const struct sk_buff *skb, + if (!hdr) + return FLOW_DISSECT_RET_OUT_BAD; + +- entry = ntohl(hdr->entry); ++ entry = ntohl(hdr[0].entry); + label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT; + bos = (entry & MPLS_LS_S_MASK) >> MPLS_LS_S_SHIFT; + +@@ -464,7 +464,19 @@ __skb_flow_dissect_mpls(const struct sk_buff *skb, + + *entropy_label = label == MPLS_LABEL_ENTROPY; + +- return bos ? FLOW_DISSECT_RET_OUT_GOOD : FLOW_DISSECT_RET_PROTO_AGAIN; ++ if (bos) { ++ /* A wild assumption. I use IPv4 and IPv6 only */ ++ u8 firstbyte = ntohl(hdr[1].entry) >> 24; ++ if (0x45 <= firstbyte && firstbyte <= 0x4f) { ++ *proto = htons(ETH_P_IP); ++ return FLOW_DISSECT_RET_PROTO_AGAIN; ++ } else if (0x60 <= firstbyte && firstbyte <= 0x6f) { ++ *proto = htons(ETH_P_IPV6); ++ return FLOW_DISSECT_RET_PROTO_AGAIN; ++ } ++ return FLOW_DISSECT_RET_OUT_GOOD; ++ } ++ return FLOW_DISSECT_RET_PROTO_AGAIN; + } + + static enum flow_dissect_ret +@@ -1263,7 +1275,7 @@ bool __skb_flow_dissect(const struct net *net, + fdret = __skb_flow_dissect_mpls(skb, flow_dissector, + target_container, data, + nhoff, hlen, mpls_lse, +- &mpls_el); ++ &mpls_el, &proto); + nhoff += sizeof(struct mpls_label); + mpls_lse++; + break; +@@ -1833,6 +1845,11 @@ static const struct flow_dissector_key flow_keys_dissector_keys[] = { + .key_id = FLOW_DISSECTOR_KEY_GRE_KEYID, + .offset = offsetof(struct flow_keys, keyid), + }, ++ { ++ .key_id = FLOW_DISSECTOR_KEY_MPLS, ++ /* XXX: Reusing keyid */ ++ .offset = offsetof(struct flow_keys, keyid), ++ }, + }; + + static const struct flow_dissector_key flow_keys_dissector_symmetric_keys[] = { +-- +2.35.1 + diff --git a/debian/patches/series b/debian/patches/series index 700c4fb76..905f7da48 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -126,3 +126,6 @@ bugfix/all/tools-rtla-build-with-extra-c-ld-flags.patch bugfix/all/tools-rtla-fix-command-symlinks.patch # ABI maintenance + +# RHE +rhe/0001-net-flow_dissector-dissect-into-ip-ipv6-header-insid.patch -- cgit v1.2.3