From nobody Thu Jun 08 18:11:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QcXNT26mgz4cFgX; Thu, 8 Jun 2023 18:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QcXNS72Tgz3xVZ; Thu, 8 Jun 2023 18:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686247913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5jX1+BN0CFnl4QK9N1ISluMkr6V5TyfC1SwhjfhVAs=; b=qnbCLSlNgTp6LvCZZUthhHctIr7TmL+ArokrXYwQNEsS1MxjlZSS7+oXFm75NE8TJjTbV+ hxIM/LJSArSRxX2/1k24sNx+2XrRkFtBTM8NdbIdbuowWt7mFcj9bH/qj5FD0tuIKbI/dj XKUhA/UoklyZmasPyUtXTxTjQI4zlt0rfVp13KS7gK0MZ7+UjGNDaDLGGBIR0HywdALX+p f99NwtEGF4Pxcn/t98kdRHGYIiSHmp2vKsrhFnJFYZR/UUkSwPMJsZjpxE4PVxaPQ4Cnhb 4+hSqCp4LAFX+kmenMjZP3pyuZ5fRNbQ1yL6pBPLm9+UchCWV6foVxNsiMA4SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686247913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t5jX1+BN0CFnl4QK9N1ISluMkr6V5TyfC1SwhjfhVAs=; b=tJ9onknkCLtolSeI+/QTZFjLRglmc/Zbszvizh+laM7OjKiwjI+ErWsj+BUP4hMh0ILRjC Tx43iH3BLX22tEJhRfD1bSXff1HfrpaYllcbiiloPXFIfMbuNKGb+kx63tg+fKukaTOsDi 0ZyGwVDmG7Vhv8cAPqNUz8JVjYGci6orJ+1oPt4WxNUTF+uwvLs2FbcA2IzrR0APXr/6d+ mxpaB2JCksQRwjoES3r0ETKTGrlRnhCD2Uyy+y+OsyT5VwziYWKX8BWW/m54FpYg9HbKOO Cw3/fZmfaTnPPfcw4qZgci7UjrNLD8NDEvJp05D1QADzBrmjG0Jiahu9zxjWrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686247913; a=rsa-sha256; cv=none; b=dSkyxQybyvEeBU6rjadlnBRWObGhutGCwREBg+WUyyb5G78KaU+WeYuMpNC0NkU4vEKVZn QZgslNsvidGCMP2uBLdA+VSTLjw0r0sVirWxhlcWm5/Iv6YJC6C5bNSqi8NoIlhVDnPuwb hTaeTGBWageCMPKBte0kw/8iKZ0LcTnmp/uO+ETn84QnNsmG7P4HYKKbfuqo65Ju523+t4 UApd17L1bOXI7z+BRqnnHkg3JOaVozc6cIZEqUwYo9wPEfmbwW46pjjxbAlq0DXyLVlXhv Hpd9bO/DtK+Z1XcAjUtM46oCYQcx4G1hr1j0i+jUFF1wD1tO08Jy8Faxg9/hgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QcXNS675xz1471; Thu, 8 Jun 2023 18:11:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358IBqOM027954; Thu, 8 Jun 2023 18:11:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358IBqjD027953; Thu, 8 Jun 2023 18:11:52 GMT (envelope-from git) Date: Thu, 8 Jun 2023 18:11:52 GMT Message-Id: <202306081811.358IBqjD027953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a30a0d940dae - main - LinuxKPI: add dummy rhashtable implementation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a30a0d940daef2df51371cf142790109e2019fa0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a30a0d940daef2df51371cf142790109e2019fa0 commit a30a0d940daef2df51371cf142790109e2019fa0 Author: Bjoern A. Zeeb AuthorDate: 2023-05-20 00:45:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-06-08 18:11:11 +0000 LinuxKPI: add dummy rhashtable implementation Add a skeleton implementation of rhashtable in order to keep an upcoming wireless driver compiling. We'll implement it as soon as we get there. MFC after: 10 days Reviewed by: emaste (previous version before his suggested changes) Differential Revision: https://reviews.freebsd.org/D40176 --- .../linuxkpi/common/include/linux/rhashtable.h | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/rhashtable.h b/sys/compat/linuxkpi/common/include/linux/rhashtable.h new file mode 100644 index 000000000000..273ea235b801 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/rhashtable.h @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2023 Bjoern A. Zeeb + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LINUXKPI_LINUX_RHASHTABLE_H +#define _LINUXKPI_LINUX_RHASHTABLE_H + +#include /* pr_debug */ + +struct rhash_head { +}; + +struct rhashtable_params { + uint16_t head_offset; + uint16_t key_len; + uint16_t key_offset; + uint16_t nelem_hint; + bool automatic_shrinking; +}; + +struct rhashtable { +}; + +static inline int +rhashtable_init(struct rhashtable *rht, + const struct rhashtable_params *params) +{ + + pr_debug("%s: TODO\n", __func__); + return (-1); +} + +static inline void +rhashtable_destroy(struct rhashtable *rht) +{ + pr_debug("%s: TODO\n", __func__); +} + +static inline void * +rhashtable_lookup_fast(struct rhashtable *rht, const void *key, + const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline void * +rhashtable_lookup_get_insert_fast(struct rhashtable *rht, + struct rhash_head *obj, const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (NULL); +} + +static inline int +rhashtable_remove_fast(struct rhashtable *rht, + struct rhash_head *obj, const struct rhashtable_params params) +{ + + pr_debug("%s: TODO\n", __func__); + return (-ENOENT); +} + +#endif /* _LINUXKPI_LINUX_RHASHTABLE_H */