Skip to content

Commit

Permalink
Set ipv6_pinfo_offset field in struct proto
Browse files Browse the repository at this point in the history
  • Loading branch information
johnousterhout committed Dec 3, 2024
1 parent dd48bbc commit f2ab056
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 3 additions & 5 deletions homa_plumbing.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,9 @@ static struct proto homav6_prot = {
.sysctl_wmem = &sysctl_homa_wmem_min,
.sysctl_rmem = &sysctl_homa_rmem_min,

/* IPv6 data comes *after* Homa's data, and isn't included in
* struct homa_sock.
*/
.obj_size = sizeof(struct homa_sock) +
sizeof(struct ipv6_pinfo),
.obj_size = sizeof(struct homa_v6_sock),
.ipv6_pinfo_offset = offsetof(struct homa_v6_sock, inet6),

.no_autobind = 1,
};

Expand Down
9 changes: 9 additions & 0 deletions homa_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,15 @@ struct homa_sock {
struct homa_pool *buffer_pool;
};

/**
* struct homa_v6_sock - For IPv6, additional IPv6-specific information
* is present in the socket struct after Homa-specific information.
*/
struct homa_v6_sock {
struct homa_sock homa;
struct ipv6_pinfo inet6;
};

void homa_bucket_lock_slow(struct homa_rpc_bucket *bucket,
__u64 id);
int homa_sock_bind(struct homa_socktab *socktab,
Expand Down

0 comments on commit f2ab056

Please sign in to comment.