Skip to content

Commit 70070bf

Browse files
slypovskMatthew Chapman
authored andcommitted
exasock: fix issue with accelerated connections on Ubuntu 20.xx and upstream
kernels 5.4.68+, causing either connection failure or lack of acceleration. The root cause of this issue: on recent kernels, ip_route_output_key does not update the floi4_oif field of the flowi4 structure, so the output interface index was 0 even though we managed to find a route. The modified code retrieves the output interface from the dst_entry rather than the flowi4 structure.
1 parent 932c043 commit 70070bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/exasock/exasock-dst.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,11 @@ static struct net_device *__exasock_dst_get_if(uint32_t *saddr,
317317

318318
#ifndef __FILLS_RT_IIF
319319
*saddr = fl4->saddr;
320-
oif = fl4->flowi4_oif;
320+
/* Retrieve value for output interface from dst_entry structure instead of
321+
* flowi4. Since 5.4.68 version flowi4_oif field is not updated by
322+
* _ip_route_output_key anymore. The most logical is to read the index of
323+
* the output interface from the cached route */
324+
oif = (*rt)->dst.dev->ifindex;
321325
#else
322326
*saddr = (*rt)->rt_src;
323327
oif = (*rt)->rt_iif;

0 commit comments

Comments
 (0)