In D53100#1214836, @gallatin wrote:In D53100#1214833, @akiyano_amazon.com wrote:I built and installed the latest kernel with this patchset in AWS and ran a network sanity check with iperf and all looks good.
turned on net.inet.tcp.input_verify_hash with sysctl net.inet.tcp.input_verify_hash=1
ran traffic
lookede at
sysctl net.inet.tcp.input_nohash
sysctl net.inet.tcp.input_badhashand both were 0
no prints to dmesg
commit lgtm.
Thank you so much for quick and complete testing. Much appreciated!
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Yesterday
Yesterday
akiyano_amazon.com added a comment to D53100: ena: use newly exposed RSS hash key API rather than ad-hoc hashing.
Fri, Oct 17
Fri, Oct 17
akiyano_amazon.com added a comment to D53100: ena: use newly exposed RSS hash key API rather than ad-hoc hashing.
I built and installed the latest kernel with this patchset in AWS and ran a network sanity check with iperf and all looks good.
Wed, Oct 15
Wed, Oct 15
akiyano_amazon.com added a comment to D53100: ena: use newly exposed RSS hash key API rather than ad-hoc hashing.
Thank you for submitting this patch.
Can you please provide a commit message that explains this change.
For example questions that immediately arise:
- What "newly exposed RSS hash key API" you are talking about (link to the commits that added this API)?
- Why it is ok to remove the #ifdef RSS?
- Why do you also remove the #ifdef RSS in ena_datapath.c?
- How did you test the change?
May 1 2025
May 1 2025
akiyano_amazon.com committed rG162b5bbb4048: ena: Fix misconfiguration when requesting regular LLQ (authored by darinzon_amazon.com).
ena: Fix misconfiguration when requesting regular LLQ
akiyano_amazon.com committed rG7ea71ba86a57: ena: Bump driver version to v2.8.1 (authored by akiyano_amazon.com).
ena: Bump driver version to v2.8.1
akiyano_amazon.com committed rG3f4a674a8ee4: ena: Fix misconfiguration when requesting regular LLQ (authored by darinzon_amazon.com).
ena: Fix misconfiguration when requesting regular LLQ
akiyano_amazon.com committed rGa1685d25601e: ena: Bump driver version to v2.8.1 (authored by akiyano_amazon.com).
ena: Bump driver version to v2.8.1
Apr 29 2025
Apr 29 2025
akiyano_amazon.com committed rG56c45700f2ae: ena: Fix misconfiguration when requesting regular LLQ (authored by darinzon_amazon.com).
ena: Fix misconfiguration when requesting regular LLQ
akiyano_amazon.com committed rG59b30c1a864e: ena: Bump driver version to v2.8.1 (authored by akiyano_amazon.com).
ena: Bump driver version to v2.8.1
Apr 28 2025
Apr 28 2025
akiyano_amazon.com updated the diff for D50040: ena: Fix misconfiguration when requesting regular LLQ.
Added default: clause to switch to handle case of illegal values set to force_large_llq_header
Fixed comments by cperciva@ I got via mail, since I accidentally turned comments off here:
akiyano_amazon.com updated the diff for D50040: ena: Fix misconfiguration when requesting regular LLQ.
Fixed comments by cperciva@ that I got via email since I blocked accidentally comments here
Apr 27 2025
Apr 27 2025
akiyano_amazon.com changed the edit policy for D50040: ena: Fix misconfiguration when requesting regular LLQ.
Apr 25 2025
Apr 25 2025
akiyano_amazon.com requested review of D50040: ena: Fix misconfiguration when requesting regular LLQ.
Jan 14 2024
Jan 14 2024
akiyano_amazon.com committed rGc8a0dbcaff3f: ena: Update driver version to v2.7.0 (authored by osamaabb_amazon.com).
ena: Update driver version to v2.7.0
akiyano_amazon.com committed rGba2007c083ef: ena: Update the license dating to 2023 (authored by osamaabb_amazon.com).
ena: Update the license dating to 2023
akiyano_amazon.com committed rGbe6292777476: ena: Support srd metrics with sysctl (authored by osamaabb_amazon.com).
ena: Support srd metrics with sysctl
akiyano_amazon.com committed rG86f779a18c0d: ena: Support customer metric with sysctl (authored by osamaabb_amazon.com).
ena: Support customer metric with sysctl
akiyano_amazon.com committed rGcdf3fb73ae13: ena: Introduce shared sample interval for all stats (authored by osamaabb_amazon.com).
ena: Introduce shared sample interval for all stats
akiyano_amazon.com committed rG026a78a2adb4: ena: Remove CQ tail pointer update API (authored by osamaabb_amazon.com).
ena: Remove CQ tail pointer update API
akiyano_amazon.com committed rG2f7f8526c38d: ena: Update ena_com_update_intr_reg API usage (authored by osamaabb_amazon.com).
ena: Update ena_com_update_intr_reg API usage
akiyano_amazon.com committed rG99c3944243a0: ena: Add sysctl support for spreading IRQs (authored by osamaabb_amazon.com).
ena: Add sysctl support for spreading IRQs
akiyano_amazon.com committed rG6e9bfa8040b5: ena: Change measurement unit of time since last tx cleanup to ms (authored by akiyano_amazon.com).
ena: Change measurement unit of time since last tx cleanup to ms
akiyano_amazon.com committed rGc07c5801f82b: ena: Upgrade ena-com to freebsd v2.7.0 (authored by akiyano_amazon.com).
ena: Upgrade ena-com to freebsd v2.7.0
akiyano_amazon.com committed rG9015208bff0a: ena: Update driver version to v2.7.0 (authored by osamaabb_amazon.com).
ena: Update driver version to v2.7.0
akiyano_amazon.com committed rGeb29118a2fe5: ena: Update the license dating to 2023 (authored by osamaabb_amazon.com).
ena: Update the license dating to 2023
akiyano_amazon.com committed rG9757b07f1800: ena: Support srd metrics with sysctl (authored by osamaabb_amazon.com).
ena: Support srd metrics with sysctl
akiyano_amazon.com committed rG538f9ea8fa58: ena: Support customer metric with sysctl (authored by osamaabb_amazon.com).
ena: Support customer metric with sysctl
akiyano_amazon.com committed rG79c446badb02: ena: Introduce shared sample interval for all stats (authored by osamaabb_amazon.com).
ena: Introduce shared sample interval for all stats
akiyano_amazon.com committed rG9d773b0d5f56: ena: Remove CQ tail pointer update API (authored by osamaabb_amazon.com).
ena: Remove CQ tail pointer update API
akiyano_amazon.com committed rG00916b6d298e: ena: Update ena_com_update_intr_reg API usage (authored by osamaabb_amazon.com).
ena: Update ena_com_update_intr_reg API usage
akiyano_amazon.com committed rG71cd348d2454: ena: Add sysctl support for spreading IRQs (authored by osamaabb_amazon.com).
ena: Add sysctl support for spreading IRQs
akiyano_amazon.com committed rG4526ef3d05dd: ena: Change measurement unit of time since last tx cleanup to ms (authored by akiyano_amazon.com).
ena: Change measurement unit of time since last tx cleanup to ms
akiyano_amazon.com committed rG6b358493a69c: ena: Upgrade ena-com to freebsd v2.7.0 (authored by akiyano_amazon.com).
ena: Upgrade ena-com to freebsd v2.7.0
Dec 28 2023
Dec 28 2023
akiyano_amazon.com committed rG4e2688cc762d: ena: Update driver version to v2.7.0 (authored by osamaabb_amazon.com).
ena: Update driver version to v2.7.0
akiyano_amazon.com committed rG246aa273244e: ena: Update the license dating to 2023 (authored by osamaabb_amazon.com).
ena: Update the license dating to 2023
akiyano_amazon.com committed rG36d42c862f4a: ena: Support srd metrics with sysctl (authored by osamaabb_amazon.com).
ena: Support srd metrics with sysctl
akiyano_amazon.com committed rGf97993ad7b9c: ena: Support customer metric with sysctl (authored by osamaabb_amazon.com).
ena: Support customer metric with sysctl
akiyano_amazon.com committed rG5b925280d9a5: ena: Introduce shared sample interval for all stats (authored by osamaabb_amazon.com).
ena: Introduce shared sample interval for all stats
akiyano_amazon.com committed rG2835752e075f: ena: Remove CQ tail pointer update API (authored by osamaabb_amazon.com).
ena: Remove CQ tail pointer update API
akiyano_amazon.com committed rGf9e1d9471077: ena: Add sysctl support for spreading IRQs (authored by osamaabb_amazon.com).
ena: Add sysctl support for spreading IRQs
akiyano_amazon.com committed rG72e34ebdd088: ena: Update ena_com_update_intr_reg API usage (authored by osamaabb_amazon.com).
ena: Update ena_com_update_intr_reg API usage
akiyano_amazon.com committed rG9272e45c04c0: ena: Change measurement unit of time since last tx cleanup to ms (authored by akiyano_amazon.com).
ena: Change measurement unit of time since last tx cleanup to ms
akiyano_amazon.com committed rGadfed2d835a7: ena: Upgrade ena-com to freebsd v2.7.0 (authored by akiyano_amazon.com).
ena: Upgrade ena-com to freebsd v2.7.0
akiyano_amazon.com committed rG04cf7cee5ae0: ena: Upgrade ena-com to freebsd v2.7.0 (authored by osamaabb_amazon.com).
ena: Upgrade ena-com to freebsd v2.7.0
Nov 20 2023
Nov 20 2023
akiyano_amazon.com committed R11:eab69f7420f1: astro/xearth: add myself (akiyano) to freebsd.committers.markers (authored by akiyano_amazon.com).
astro/xearth: add myself (akiyano) to freebsd.committers.markers
akiyano_amazon.com committed rGfec0c3fb08cc: Add myself (akiyano) to calendar.freebsd (authored by akiyano_amazon.com).
Add myself (akiyano) to calendar.freebsd
akiyano_amazon.com committed R9:91b077d39e18: New committer (src): Arthur Kiyanovski (akiyano) (authored by akiyano_amazon.com).
New committer (src): Arthur Kiyanovski (akiyano)
Nov 19 2023
Nov 19 2023
akiyano_amazon.com committed rG33db883c9598: Add akiyano as src committer and cperciva as mentor (authored by akiyano_amazon.com).
Add akiyano as src committer and cperciva as mentor
Jun 28 2023
Jun 28 2023
In D40769#927934, @diizzy wrote:Looks like you submitted the wrong patch?
Jun 27 2023
Jun 27 2023
akiyano_amazon.com added a reviewer for D40765: ena: Initialize statistics before the interface is available: mw.
akiyano_amazon.com requested review of D40765: ena: Initialize statistics before the interface is available.
Jun 6 2023
Jun 6 2023
akiyano_amazon.com added a comment to D39614: ifnet: fix use-after-free by ignoring post-detach ifp link events..
In D39614#919546, @melifaro wrote:In D39614#907626, @kp wrote:In D39614#907531, @melifaro wrote:In D39614#902547, @kp wrote:The fix to this particular issue depends on the answers of the above (or can be a bandaid as in diff if we want to kick the can down the road).
Those are all good questions, but I think in this case our issue is that the ifnet goes away between the task being enqueued and executed. There are a number of other places where we see things like that, and that's the 'general problem' I was referring to.
Ack! I was looking into it from a different angle. The mental model of "safe detach" to me is a) set the demarcation point that signals "no more data accepted", b) ensure no data is indeed accepted and c) clear the queued data. I'm a bit unsure if we can or should generalise the implementations for the different datapaths and control plane. The current code mostly have everything implemented - IFF_DYING flag is set, marking the end of the era and the taskq is cleaned from the link tasks matching this interface. The remaining part is rejecting new changes.
We can indeed do an MPASS() check in the enqueue code to reject such code patterns if that's what we agree with.
What do you folks think?
So that seems like a sane general approach, but I'm not clear on how it'd work here. We'd have to make sure the ifp sticks around until the task queue no longer has any if_linktasks remaining, and I don't think we have a mechanism for that currently.
I think we have something in if.c:if_detach_internal() for that ( https://cgit.freebsd.org/src/tree/sys/net/if.c#n1145 ):
/* * In any case (destroy or vmove) detach us from the groups * and remove/wait for pending events on the taskq. * XXX-BZ in theory an interface could still enqueue a taskq change? */ if_delgroups(ifp); taskqueue_drain(taskqueue_swi, &ifp->if_linktask); taskqueue_drain(taskqueue_swi, &ifp->if_addmultitask);So I still believe that the remaining part is to reject the new changes. Happy to discuss it more :-)
And anyway, @akiyano_amazon.com, I guess we need the driver to be updated to avoid setting the state when dying. Could you please look at that?
Apr 19 2023
Apr 19 2023
akiyano_amazon.com added a comment to D39614: ifnet: fix use-after-free by ignoring post-detach ifp link events..
In D39614#902533, @melifaro wrote:In D39614#901770, @zlei wrote:I do not quite understand this logic:
ena_detach() ether_ifdetach() if_detach() if_detach_internal() # here we drain taskqueue_swi from link events ena_destroy_device() if_link_state_change() # here we enqueue new link eventWhy is ether_ifdetach() invoked before if_link_state_change() ???
As far as I understand, ena_destroy_device() is called in multiple places, including an init error handler, so it incorporates setting the link down. I think that it would make sense for the driver to move the link state change elsewhere, but I'd prefer to address the stack problem first.
Apr 17 2023
Apr 17 2023
akiyano_amazon.com added a comment to D39614: ifnet: fix use-after-free by ignoring post-detach ifp link events..
I've tested this commit and it solves the issue.
Updated kernel and world to the latest main. => Issue reproduced.
Applied this fix to kernel sources, built and installed kernel => issue doesn't reproduce.
Apr 13 2023
Apr 13 2023
In D39048#899642, @melifaro wrote:In D39048#899603, @zlei wrote:In D39048#899501, @akiyano_amazon.com wrote:Hi all,
I hope it is OK that I write this here, if not please tell me what will be a better place to do it.
This commit has made the ENA driver crash upon kldunload if_ena.ko. (I made sure by running buildworld on this commit and on the commit before it)Here is the full call stack that was dumped:
curthread () at /root/freebsd-src/sys/amd64/include/pcpu_aux.h:59
59 asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu,
(kgdb) #0 __curthread () at /root/freebsd-src/sys/amd64/include/pcpu_aux.h:59
#1 doadump (textdump=textdump@entry=1)
at /root/freebsd-src/sys/kern/kern_shutdown.c:407
#2 0xffffffff80bedc6c in kern_reboot (howto=260)
at /root/freebsd-src/sys/kern/kern_shutdown.c:528
#3 0xffffffff80bee18f in vpanic (fmt=<optimized out>,
ap=ap@entry=0xfffffe01fef62ae0)
at /root/freebsd-src/sys/kern/kern_shutdown.c:972
#4 0xffffffff80bedf13 in panic (fmt=<unavailable>)
at /root/freebsd-src/sys/kern/kern_shutdown.c:896
#5 0xffffffff810e2b39 in trap_fatal (frame=0xfffffe01fef62b70, eva=0)
at /root/freebsd-src/sys/amd64/amd64/trap.c:954
#6 <signal handler called>
#7 dump_sa (nw=nw@entry=0xfffffe01fef62d08, attr=attr@entry=1,
sa=0xdeadc0dedeadc0de) at /root/freebsd-src/sys/netlink/route/iface.c:210
#8 0xffffffff80e5659a in dump_iface (nw=nw@entry=0xfffffe01fef62d08,
ifp=ifp@entry=0xfffff80109bbe800, hdr=hdr@entry=0xfffffe01fef62d48,
if_flags_mask=if_flags_mask@entry=0)
at /root/freebsd-src/sys/netlink/route/iface.c:279
#9 0xffffffff80e55e7b in rtnl_handle_ifevent (ifp=0xfffff80109bbe800,
nlmsg_type=<optimized out>, if_flags_mask=0)
at /root/freebsd-src/sys/netlink/route/iface.c:943
#10 0xffffffff80d1fc1d in do_link_state_change (arg=0xfffff80109bbe800,
pending=1) at /root/freebsd-src/sys/net/if.c:2205
#11 0xffffffff80c5233a in taskqueue_run_locked (
queue=queue@entry=0xfffff80106ce7100)
at /root/freebsd-src/sys/kern/subr_taskqueue.c:514
#12 0xffffffff80c5224d in taskqueue_run (queue=0xfffff80106ce7100)
at /root/freebsd-src/sys/kern/subr_taskqueue.c:529
#13 0xffffffff80ba8126 in intr_event_execute_handlers (ie=0xfffff80106a9d300,
p=<optimized out>) at /root/freebsd-src/sys/kern/kern_intr.c:1207
#14 ithread_execute_handlers (ie=0xfffff80106a9d300, p=<optimized out>)
at /root/freebsd-src/sys/kern/kern_intr.c:1220
#15 ithread_loop (arg=arg@entry=0xfffff80106c951c0)
at /root/freebsd-src/sys/kern/kern_intr.c:1308
#16 0xffffffff80ba45c0 in fork_exit (
callout=0xffffffff80ba7eb0 <ithread_loop>, arg=0xfffff80106c951c0,
frame=0xfffffe01fef62f40) at /root/freebsd-src/sys/kern/kern_fork.c:1102
#17 <signal handler called>
(kgdb)I don't have much experience with CARP, and I was wondering if anything obvious jumps out from this call stack with regard to this commit?
Thank you for the report!
I agree with the assessment, it's not carp related.
When the ifnet departure hook is called, indeed some stuff from the ifnet may have been already disappeared. I'll update the callback handler to use only basic interface info, that should be present till the end.
Apr 11 2023
Apr 11 2023
Hi all,
I hope it is OK that I write this here, if not please tell me what will be a better place to do it.
This commit has made the ENA driver crash upon kldunload if_ena.ko. (I made sure by running buildworld on this commit and on the commit before it)