Commit dc97553
ethtool: fix the state of additional contexts with old API
We expect drivers implementing the new create/modify/destroy
API to populate the defaults in struct ethtool_rxfh_context.
In legacy API ctx isn't even passed, and rxfh.indir / rxfh.key
are NULL so drivers can't give us defaults even if they want to.
Call get_rxfh() to fetch the values. We can reuse rxfh_dev
for the get_rxfh(), rxfh stores the input from the user.
This fixes IOCTL reporting 0s instead of the default key /
indir table for drivers using legacy API.
Add a check to try to catch drivers using the new API
but not populating the key.
Fixes: 7964e78 ("net: ethtool: use the tracking array for get_rxfh on custom RSS contexts")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Edward Cree <ecree.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 7195f0e commit dc97553
1 file changed
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1382 | 1382 | | |
1383 | 1383 | | |
1384 | 1384 | | |
1385 | | - | |
1386 | | - | |
| 1385 | + | |
1387 | 1386 | | |
1388 | | - | |
| 1387 | + | |
1389 | 1388 | | |
1390 | 1389 | | |
1391 | 1390 | | |
| |||
1475 | 1474 | | |
1476 | 1475 | | |
1477 | 1476 | | |
1478 | | - | |
| 1477 | + | |
1479 | 1478 | | |
1480 | 1479 | | |
1481 | | - | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1482 | 1485 | | |
1483 | 1486 | | |
1484 | 1487 | | |
1485 | | - | |
| 1488 | + | |
1486 | 1489 | | |
1487 | 1490 | | |
| 1491 | + | |
1488 | 1492 | | |
1489 | 1493 | | |
1490 | 1494 | | |
| |||
1523 | 1527 | | |
1524 | 1528 | | |
1525 | 1529 | | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1526 | 1546 | | |
1527 | 1547 | | |
1528 | 1548 | | |
| |||
1531 | 1551 | | |
1532 | 1552 | | |
1533 | 1553 | | |
1534 | | - | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
1535 | 1557 | | |
1536 | 1558 | | |
1537 | 1559 | | |
1538 | 1560 | | |
1539 | | - | |
| 1561 | + | |
1540 | 1562 | | |
1541 | 1563 | | |
1542 | 1564 | | |
| |||
0 commit comments