diff options
author | Mustafa Ismail <mustafa.ismail@intel.com> | 2022-02-02 20:19:21 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-02-08 17:54:47 +0100 |
commit | 4b860c9169dcb8aead7e1744327c52a253f5c5fd (patch) | |
tree | 66753ffa4881e6d641bb91d8a70b50f197b34909 /drivers/infiniband/hw/irdma/cm.h | |
parent | RDMA/irdma: Refactor DCB bits in prep for DSCP support (diff) | |
download | linux-4b860c9169dcb8aead7e1744327c52a253f5c5fd.tar.xz linux-4b860c9169dcb8aead7e1744327c52a253f5c5fd.zip |
RDMA/irdma: Add support for DSCP
Add DSCP support for the Intel Ethernet 800 Series devices. Setup VSI
DSCP info when PCI driver indicates DSCP mode during driver probe or as
notification event.
Link: https://lore.kernel.org/r/20220202191921.1638-4-shiraz.saleem@intel.com
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/irdma/cm.h')
-rw-r--r-- | drivers/infiniband/hw/irdma/cm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/irdma/cm.h b/drivers/infiniband/hw/irdma/cm.h index 3bf42728e9b7..19c284975fc7 100644 --- a/drivers/infiniband/hw/irdma/cm.h +++ b/drivers/infiniband/hw/irdma/cm.h @@ -384,6 +384,13 @@ int irdma_schedule_cm_timer(struct irdma_cm_node *cm_node, struct irdma_puda_buf *sqbuf, enum irdma_timer_type type, int send_retrans, int close_when_complete); + +static inline u8 irdma_tos2dscp(u8 tos) +{ +#define IRDMA_DSCP_VAL GENMASK(7, 2) + return (u8)FIELD_GET(IRDMA_DSCP_VAL, tos); +} + int irdma_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param); int irdma_reject(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len); int irdma_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param); |