TAILIEUCHUNG - Understanding Linux Network Internals 2005 phần 9

Cơ cấu dst_entry cung cấp một tập hợp các chức năng ảo trong một nameddst_ops lĩnh vực, trong đó cho phép các giao thức lớp cao hơn để chạy các giao thức cụ thể chức năng thao tác các mục. Mã DST là nằm ở net / core / và bao gồm / net / . Tất cả các thói quen thao tác cấu trúc dst_entry bắt đầu với tiền tố adst_. | This document was created by an unregistered ChmMagic please go to http to register it. Thanks PREV NEXT . Major Cache Operations The protocol-independent DST part of the cache is a set of dst_entry data structures. Most of the activities in this chapter happen through a dst_entry structure. The IPv4 and IPv6 data structures-table and rt6_info both include adst_entry data structure. The dst_entry structure offers a set of virtual functions in a field nameddst_ops which allows higher-layer protocols to run protocol-specific functions that manipulate the entries. The DST code is located in net core and include net . All the routines that manipulate dst_entry structures start with adst_ prefix. Note that even though they operate ondst_entry structures they actually affect the outer rtable structures too. DST is initialized with dst_init invoked at boot time bynet_ dev_init see Chapter 5 . . Cache Locking Read-only operations such as lookups use a different locking mechanism from read-write operations such as insertion and deletion but they naturally have to cooperate. Here is how they are handled Read-only operations These use the routines presented in the section Cache Lookup and are protected by a read-copy-update RCU read lock as in the following snapshot rcu_read_lock . perform lookup . rcu_read_unlock This code actually does no locking because read operations can proceed simultaneously without interfering with each other. Read-write operations The insertion of an entry see the section Adding Elements to the Cache and the deletion of an entry see the section Deleting DST Entries use the spin lock embedded in each bucket s element and shown irFigure 33-1. Note that the provision of a per-bucket lock lets different processors write simultaneously to different buckets. Chapter 1 explains the RCU algorithm used to implement locking in the routing table cache and how read-write spin locks coexist with RCU. . Cache Entry .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.