Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] [Deepin] net/ipv6: Fix KABI for Remove expired routes with a separated list of…#1452

Merged
lanlanxiyiji merged 1 commit intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-01-26-kabi
Jan 27, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.6-y] [Deepin] net/ipv6: Fix KABI for Remove expired routes with a separated list of…#1452
lanlanxiyiji merged 1 commit intodeepin-community:linux-6.6.yfrom
opsiff:linux-6.6.y-2026-01-26-kabi

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Jan 26, 2026

… routes

deepin inclusion
category: kabi

Fix kabi change in some whitelist symbols like nf_ct_netns_get..etc.

Log:
struct hlist_node {
struct hlist_node * next; /* 0 8 /
struct hlist_node * * pprev; /
8 8 */

    /* size: 16, cachelines: 1, members: 2 */
    /* last cacheline: 16 bytes */

};

Fixes: 87ef084 ("ipv6: add exception routes to GC list in rt6_insert_exception")

Summary by Sourcery

Preserve Deepin kernel ABI while keeping IPv6 route GC structures for exception routes.

Bug Fixes:

  • Restore KABI compatibility for IPv6 fib6_info by moving gc_link into reserved Deepin KABI slots.
  • Maintain KABI safety for fib6_table by wrapping the GC candidate list head in a Deepin KABI extension macro.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 26, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts IPv6 fib6 structures to preserve Deepin KABI stability by moving the gc_link field into reserved KABI slots and wrapping the GC candidate list head with a KABI extension macro, undoing a direct struct layout change from the upstream route GC patch.

Class diagram for updated IPv6 fib6_info and fib6_table KABI layout

classDiagram
    class fib6_info {
        +refcount_t fib6_ref
        +unsigned_long expires
        +DEEPIN_KABI_USE_1_2_gc_link
        +struct dst_metrics* fib6_metrics
        +struct rcu_head rcu
        +struct nexthop* nh
        +struct fib6_nh fib6_nh[]
    }

    class fib6_table {
        +struct inet_peer_base tb6_peers
        +unsigned_int flags
        +unsigned_int fib_seq
        +DEEPIN_KABI_EXTEND_tb6_gc_hlist
    }

    class DEEPIN_KABI_USE_1_2_gc_link {
        +struct hlist_node gc_link
    }

    class DEEPIN_KABI_EXTEND_tb6_gc_hlist {
        +struct hlist_head tb6_gc_hlist
    }

    fib6_table "1" --> "many" fib6_info : contains_routes
    fib6_info "1" --> "1" DEEPIN_KABI_USE_1_2_gc_link : kabi_wraps
    fib6_table "1" --> "1" DEEPIN_KABI_EXTEND_tb6_gc_hlist : kabi_extends
Loading

File-Level Changes

Change Details Files
Restore KABI-stable layout for fib6_info by moving gc_link into Deepin KABI reserved space.
  • Remove direct gc_link field declaration from fib6_info to avoid hard layout change.
  • Replace two DEEPIN_KABI_RESERVE slots with a DEEPIN_KABI_USE macro that defines gc_link using reserved KABI space.
  • Maintain existing semantics of gc_link for IPv6 route GC while keeping symbol and struct layout compatibility for consumers.
include/net/ip6_fib.h
Wrap IPv6 fib6_table GC list head in a Deepin KABI extension macro.
  • Replace plain struct hlist_head tb6_gc_hlist member with DEEPIN_KABI_EXTEND macro invocation.
  • Preserve tb6_gc_hlist functionality as GC candidates list while allowing KABI-safe extension of fib6_table.
  • Ensure external KABI consumers see a compatible fib6_table layout despite the added GC field.
include/net/ip6_fib.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Double-check that DEEPIN_KABI_USE(1, 2, struct hlist_node gc_link) matches the intended macro contract (e.g., contiguous slots, type size) so that the resulting fib6_info layout remains binary compatible across existing Deepin kernel builds.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Double-check that `DEEPIN_KABI_USE(1, 2, struct hlist_node gc_link)` matches the intended macro contract (e.g., contiguous slots, type size) so that the resulting `fib6_info` layout remains binary compatible across existing Deepin kernel builds.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the IPv6 routing structures to preserve Deepin kernel ABI while still supporting the new GC list for IPv6 exception routes introduced upstream.

Changes:

  • Move fib6_info::gc_link into existing Deepin KABI reserved slots using DEEPIN_KABI_USE(1, 2, struct hlist_node gc_link) to restore KABI compatibility without changing the exported layout.
  • Wrap fib6_table::tb6_gc_hlist in DEEPIN_KABI_EXTEND(struct hlist_head tb6_gc_hlist) so the GC candidate list head is added without affecting existing ABI-visible portions of the struct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… routes

deepin inclusion
category: kabi

Fix kabi change in some whitelist symbols like nf_ct_netns_get..etc.

Log:
struct hlist_node {
        struct hlist_node *        next;                 /*     0     8 */
        struct hlist_node * *      pprev;                /*     8     8 */

        /* size: 16, cachelines: 1, members: 2 */
        /* last cacheline: 16 bytes */
};

Fixes: 378dd99 ("net/ipv6: Remove expired routes with a separated list of routes.")
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@opsiff opsiff force-pushed the linux-6.6.y-2026-01-26-kabi branch from 1aa885a to 21a9b53 Compare January 27, 2026 02:57
@lanlanxiyiji lanlanxiyiji merged commit 3427f09 into deepin-community:linux-6.6.y Jan 27, 2026
12 of 14 checks passed
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lanlanxiyiji
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

opsiff added a commit to opsiff/UOS-kernel that referenced this pull request Feb 10, 2026
… list of routes"

deepin inclusion
category: kabi

This reverts commit 3427f09.
We release new kabi version, revert it.

Link: deepin-community#1452
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
opsiff added a commit that referenced this pull request Feb 11, 2026
… list of routes"

deepin inclusion
category: kabi

This reverts commit 3427f09.
We release new kabi version, revert it.

Link: #1452
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants