On 12/3/24 9:51 AM, Andrew Lunn wrote:
On Mon, Dec 02, 2024 at 11:51:48AM +0800, D. Wythe wrote:
+/**
+ * homa_setsockopt() - Implements the getsockopt system call for Homa sockets.
+ * @sk: Socket on which the system call was invoked.
+ * @level: Level at which the operation should be handled; will always
+ * be IPPROTO_HOMA.
+ * @optname: Identifies a particular setsockopt operation.
+ * @optval: Address in user space of information about the option.
+ * @optlen: Number of bytes of data at @optval.
+ * Return: 0 on success, otherwise a negative errno.
+ */
+int homa_setsockopt(struct sock *sk, int level, int optname, sockptr_t optval,
+ unsigned int optlen)
+{
+ struct homa_sock *hsk = homa_sk(sk);
+ struct homa_set_buf_args args;
+ int ret;
+
+ if (level != IPPROTO_HOMA || optname != SO_HOMA_SET_BUF ||
+ optlen != sizeof(struct homa_set_buf_args))
+ return -EINVAL;
SO_HOMA_SET_BUF is a bit odd here, maybe HOMA_RCVBUF ? which also can be
implemented in getsockopt.
Please trim the text when replying to just the needed context. With
pages and pages of useless quoted text it is easy to overlook your
comments.
Andrew
Got it. Thanks for advice.
D. Wythe