summaryrefslogtreecommitdiffstats
path: root/drivers/vlynq
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-03-02 16:16:01 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-05 14:59:05 -0700
commit847a1d6796c767f8b697ead60997b847a84b897b (patch)
tree3fdd2c06bf101b77ed307ef0fd2625eb4fef39dc /drivers/vlynq
parent8e2cc0e67f4aa33931cd15a553938163a19dcab3 (diff)
downloadlinux-847a1d6796c767f8b697ead60997b847a84b897b.tar.bz2
e1000: Do not overestimate descriptor counts in Tx pre-check
The current code path is capable of grossly overestimating the number of descriptors needed to transmit a new frame. This specifically occurs if the skb contains a number of 4K pages. The issue is that the logic for determining the descriptors needed is ((S) >> (X)) + 1. When X is 12 it means that we were indicating that we required 2 descriptors for each 4K page when we only needed one. This change corrects this by instead adding (1 << (X)) - 1 to the S value instead of adding 1 after the fact. This way we get an accurate descriptor needed count as we are essentially doing a DIV_ROUNDUP(). Reported-by: Ivan Suzdal <isuzdal@mirantis.com> Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/vlynq')
0 files changed, 0 insertions, 0 deletions