Model SOCK_OPS flow lifetime independently of classify execution

Đang mở
#346 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
networking, testing-qa

Hướng nghiên cứu

Start from the simulated SOCK_OPS APIs, where flow ID creation and the synchronous WFP classify call happen in one operation, and from the flowDeleteFn path for associated contexts. Split creation, classification for an existing flow ID, and deletion into separate operations, keeping the synchronous helpers as wrappers. Done means IPv4 and IPv6 tests delete a flow before, during, and after classification, with exactly one flowDeleteFn callback per associated context.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The simulated SOCK_OPS APIs create a flow ID and synchronously invoke the WFP classify callback in one operation. The caller does not regain control until classification completes, so a test cannot publish the simulated flow as live and delete that same flow while its established callback is running.

This prevents usersim from faithfully modeling independent WFP flow creation, classification, and deletion, and leaves the original SOCK_OPS association/program-invocation race difficult to regression-test without test-only synchronization inside the program callback.

Originating review: https://github.com/microsoft/ebpf-for-windows/pull/5623#discussion_r4450724952

Desired behavior

Represent a simulated network flow separately from an optional WFP flow-context association. Tests should be able to:

  1. Create a flow and receive its flow ID.
  2. Invoke classification for that existing flow ID.
  3. Delete the flow before, during, or after classification.

The existing synchronous helpers can remain as compatibility wrappers over the split operations.

Acceptance criteria

  • IPv4 and IPv6 SOCK_OPS flows can be created before classification begins.
  • Classification accepts an existing flow ID rather than always allocating one internally.
  • Flow deletion is safe before association, during classification, and after association.
  • An associated context receives exactly one flowDeleteFn callback.
  • Existing usersim callers retain compatible behavior.
  • Tests cover the three deletion timings for both address families.
Ngôn ngữ chính
C++
Star
112
Fork
36
Merge trung bình
8 ngày 10 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/usersim

Tất cả issue của microsoft/usersim

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.