Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/efa: Rename alloc_ucontext comp_mask to supported_caps

Following discussion [1], rename the comp_mask field in
efa_ibv_alloc_ucontext_cmd to supported_caps to reflect its actual
usage as a capabilities handshake mechanism rather than a standard
comp_mask. Rename related constants and align function and macro names.

[1] https://lore.kernel.org/linux-rdma/20260312120858.GH1448102@nvidia.com/

Signed-off-by: Michael Margolin <mrgolin@amazon.com>
Link: https://patch.msgid.link/20260316180846.30273-1-mrgolin@amazon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Michael Margolin and committed by
Leon Romanovsky
5aeb6e03 6be4ca0a

+12 -11
+9 -8
drivers/infiniband/hw/efa/efa_verbs.c
··· 1917 1917 return efa_com_dealloc_uar(&dev->edev, &params); 1918 1918 } 1919 1919 1920 - #define EFA_CHECK_USER_COMP(_dev, _comp_mask, _attr, _mask, _attr_str) \ 1921 - (_attr_str = (!(_dev)->dev_attr._attr || ((_comp_mask) & (_mask))) ? \ 1920 + #define EFA_CHECK_USER_SUPP(_dev, _supported_caps, _attr, _mask, _attr_str) \ 1921 + (_attr_str = (!(_dev)->dev_attr._attr || ((_supported_caps) & (_mask))) ? \ 1922 1922 NULL : #_attr) 1923 1923 1924 - static int efa_user_comp_handshake(const struct ib_ucontext *ibucontext, 1924 + static int efa_user_supp_handshake(const struct ib_ucontext *ibucontext, 1925 1925 const struct efa_ibv_alloc_ucontext_cmd *cmd) 1926 1926 { 1927 1927 struct efa_dev *dev = to_edev(ibucontext->device); 1928 1928 char *attr_str; 1929 1929 1930 - if (EFA_CHECK_USER_COMP(dev, cmd->comp_mask, max_tx_batch, 1931 - EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH, attr_str)) 1930 + if (EFA_CHECK_USER_SUPP(dev, cmd->supported_caps, max_tx_batch, 1931 + EFA_ALLOC_UCONTEXT_CMD_SUPP_CAPS_TX_BATCH, 1932 + attr_str)) 1932 1933 goto err; 1933 1934 1934 - if (EFA_CHECK_USER_COMP(dev, cmd->comp_mask, min_sq_depth, 1935 - EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR, 1935 + if (EFA_CHECK_USER_SUPP(dev, cmd->supported_caps, min_sq_depth, 1936 + EFA_ALLOC_UCONTEXT_CMD_SUPP_CAPS_MIN_SQ_WR, 1936 1937 attr_str)) 1937 1938 goto err; 1938 1939 ··· 1967 1966 goto err_out; 1968 1967 } 1969 1968 1970 - err = efa_user_comp_handshake(ibucontext, &cmd); 1969 + err = efa_user_supp_handshake(ibucontext, &cmd); 1971 1970 if (err) 1972 1971 goto err_out; 1973 1972
+3 -3
include/uapi/rdma/efa-abi.h
··· 22 22 */ 23 23 24 24 enum { 25 - EFA_ALLOC_UCONTEXT_CMD_COMP_TX_BATCH = 1 << 0, 26 - EFA_ALLOC_UCONTEXT_CMD_COMP_MIN_SQ_WR = 1 << 1, 25 + EFA_ALLOC_UCONTEXT_CMD_SUPP_CAPS_TX_BATCH = 1 << 0, 26 + EFA_ALLOC_UCONTEXT_CMD_SUPP_CAPS_MIN_SQ_WR = 1 << 1, 27 27 }; 28 28 29 29 struct efa_ibv_alloc_ucontext_cmd { 30 - __u32 comp_mask; 30 + __u32 supported_caps; 31 31 __u8 reserved_20[4]; 32 32 }; 33 33