Commit 2e07a3d
RDMA/hns: Refactor hns_roce_v2_post_srq_recv()
The SRQ in the hns driver consists of the following four parts:
* wqe buf: the buffer to store WQE.
* wqe_idx buf: the cqe of SRQ may be not generated in the order of wqe, so
the wqe_idx corresponding to the idle WQE needs to be pushed into the
index queue which is a FIFO, then it instructs the hardware to obtain
the corresponding WQE.
* bitmap: bitmap is used to generate and release wqe_idx. When the user
has a new WR, the driver finds the idx of the idle wqe in bitmap. When
the CQE of wqe is generated, the driver will release the idx.
* wr_id buf: wr_id buf is used to store the user's wr_id, then return it
to the user when poll_cq verb is invoked.
The process of post SRQ recv is refactored to make preceding code clearer.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wenpeng Liang <[email protected]>
Signed-off-by: Weihang Li <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>1 parent 6b981e2 commit 2e07a3d
1 file changed
+43
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
876 | 875 | | |
877 | | - | |
878 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
879 | 898 | | |
880 | 899 | | |
881 | 900 | | |
| |||
892 | 911 | | |
893 | 912 | | |
894 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
895 | 928 | | |
896 | 929 | | |
897 | 930 | | |
898 | 931 | | |
899 | 932 | | |
900 | 933 | | |
901 | | - | |
902 | 934 | | |
903 | 935 | | |
904 | | - | |
905 | 936 | | |
| 937 | + | |
| 938 | + | |
906 | 939 | | |
| 940 | + | |
907 | 941 | | |
908 | 942 | | |
909 | 943 | | |
910 | | - | |
911 | 944 | | |
912 | | - | |
913 | 945 | | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
918 | | - | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
923 | | - | |
924 | | - | |
| 946 | + | |
| 947 | + | |
925 | 948 | | |
926 | 949 | | |
927 | 950 | | |
| |||
934 | 957 | | |
935 | 958 | | |
936 | 959 | | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
| 960 | + | |
941 | 961 | | |
942 | | - | |
943 | 962 | | |
944 | 963 | | |
945 | 964 | | |
946 | | - | |
947 | | - | |
948 | 965 | | |
949 | 966 | | |
950 | 967 | | |
| |||
0 commit comments