Commit edf8afe
net: airoha: Compute number of descriptors according to reserved memory size
In order to not exceed the reserved memory size for hwfd buffers,
compute the number of hwfd buffers/descriptors according to the
reserved memory size and the size of each hwfd buffer (2KB).
Fixes: 3a1ce9e ("net: airoha: Add the capability to allocate hwfd buffers via reserved-memory")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250619-airoha-hw-num-desc-v4-1-49600a9b319a@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent dccf87e commit edf8afe
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
1068 | 1069 | | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
1072 | | - | |
1073 | 1073 | | |
1074 | 1074 | | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
1080 | | - | |
1081 | 1075 | | |
1082 | 1076 | | |
1083 | 1077 | | |
| |||
1099 | 1093 | | |
1100 | 1094 | | |
1101 | 1095 | | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1102 | 1100 | | |
1103 | | - | |
| 1101 | + | |
1104 | 1102 | | |
1105 | 1103 | | |
1106 | 1104 | | |
1107 | 1105 | | |
1108 | 1106 | | |
1109 | 1107 | | |
1110 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1111 | 1114 | | |
1112 | 1115 | | |
1113 | 1116 | | |
| |||
1116 | 1119 | | |
1117 | 1120 | | |
1118 | 1121 | | |
1119 | | - | |
| 1122 | + | |
1120 | 1123 | | |
1121 | 1124 | | |
1122 | 1125 | | |
| |||
0 commit comments