Commit 26312c6
net: fec: correct the counting of XDP sent frames
In the current xdp_xmit implementation, if any single frame fails to
transmit due to insufficient buffer descriptors, the function nevertheless
reports success in sending all frames. This results in erroneously
indicating that frames were transmitted when in fact they were dropped.
This patch fixes the issue by ensureing the return value properly
indicates the actual number of frames successfully transmitted, rather than
potentially reporting success for all frames when some could not transmit.
Fixes: 6d6b39f ("net: fec: add initial XDP support")
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 299efdc commit 26312c6
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3798 | 3798 | | |
3799 | 3799 | | |
3800 | 3800 | | |
3801 | | - | |
| 3801 | + | |
| 3802 | + | |
3802 | 3803 | | |
3803 | 3804 | | |
3804 | 3805 | | |
| |||
3856 | 3857 | | |
3857 | 3858 | | |
3858 | 3859 | | |
| 3860 | + | |
3859 | 3861 | | |
3860 | 3862 | | |
3861 | 3863 | | |
| |||
3866 | 3868 | | |
3867 | 3869 | | |
3868 | 3870 | | |
3869 | | - | |
3870 | | - | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
3871 | 3876 | | |
3872 | 3877 | | |
3873 | 3878 | | |
| |||
3877 | 3882 | | |
3878 | 3883 | | |
3879 | 3884 | | |
3880 | | - | |
| 3885 | + | |
3881 | 3886 | | |
3882 | 3887 | | |
3883 | 3888 | | |
| |||
0 commit comments