<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 1, 2025 at 10:51 PM Stephen Hemminger <<a href="mailto:stephen@networkplumber.org" target="_blank">stephen@networkplumber.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 1 Jan 2025 15:07:35 +0530<br>
Kumara Parameshwaran <<a href="mailto:kumaraparamesh92@gmail.com" target="_blank">kumaraparamesh92@gmail.com</a>> wrote:<br>
<br>
> From: Kumara Parameshwaran <<a href="mailto:kumaraparamesh92@gmail.com" target="_blank">kumaraparamesh92@gmail.com</a>><br>
> To: <a href="mailto:hujiayu.hu@foxmail.com" target="_blank">hujiayu.hu@foxmail.com</a><br>
> Cc: <a href="mailto:dev@dpdk.org" target="_blank">dev@dpdk.org</a>, Kumara Parameshwaran <<a href="mailto:kumaraparamesh92@gmail.com" target="_blank">kumaraparamesh92@gmail.com</a>><br>
> Subject: [PATCH] lib/gro: use hash function for flow lookup<br>
> Date: Wed, 1 Jan 2025 15:07:35 +0530<br>
> X-Mailer: git-send-email 2.47.1<br>
> <br>
> optimize the GRO lookup using hash based<br>
> implementation<br>
> <br>
> Signed-off-by: Kumara Parameshwaran <<a href="mailto:kumaraparamesh92@gmail.com" target="_blank">kumaraparamesh92@gmail.com</a>><br>
<br>
Rather than open coding a hash table with collision chains, please use the<br>
existing DPDK cuckoo hash which is faster and you can also prevent hash<br>
DoS chain attacks.<br> >>Sure, I was thinking to use cuckoo hash, but then thought if this could be an overkill to for this implementation. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Alternatively, use a better hash function such as siphash which is resistent<br>
to DoS attacks.</blockquote><div> >> Yes, sure. Will change it. Had used that to get an idea for the overall implementation itself. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote></div></div>
</div>
</div>
</div>