ice: kcompat: only backport netdev_xmit_more() when kernel lacks it#67
Open
RomeoLLee wants to merge 1 commit into
Open
ice: kcompat: only backport netdev_xmit_more() when kernel lacks it#67RomeoLLee wants to merge 1 commit into
RomeoLLee wants to merge 1 commit into
Conversation
kcompat.h redefines netdev_xmit_more() as a macro on every kernel older than v5.2, reading the legacy skb->xmit_more bit-field or a constant zero. Downstream 4.19 trees exist that already backported the v5.2 helper along with the move of the xmit_more hint to softnet_data; there the macro shadows the kernel's inline and the driver reads a stale skb bit the kernel no longer maintains. If that stale bit happens to be set, ice_tx_map() skips ringing the TX tail doorbell and transmission stalls for several seconds until unrelated traffic flushes the ring. Observed with small-packet TCP flows on a 4.19.90-based tree. Probe for the helper in kcompat-generator.sh and emit the backport only under the new NEED_NETDEV_XMIT_MORE flag, matching the existing NEED_NETDEV_TX_SENT_QUEUE pattern. Kernels that genuinely lack netdev_xmit_more() keep the current fallback; affected trees now use the kernel's inline, which makes the stall go away. Signed-off-by: lilinmao <lilinmao@kylinos.cn>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
kcompat.h redefines netdev_xmit_more() as a macro on every kernel older than v5.2, reading the legacy skb->xmit_more bit-field or a constant zero. Downstream 4.19 trees exist that already backported the v5.2 helper along with the move of the xmit_more hint to softnet_data; there the macro shadows the kernel's inline and the driver reads a stale skb bit the kernel no longer maintains.
If that stale bit happens to be set, ice_tx_map() skips ringing the TX tail doorbell and transmission stalls for several seconds until unrelated traffic flushes the ring. Observed with small-packet TCP flows on a 4.19.90-based tree.
Probe for the helper in kcompat-generator.sh and emit the backport only under the new NEED_NETDEV_XMIT_MORE flag, matching the existing NEED_NETDEV_TX_SENT_QUEUE pattern. Kernels that genuinely lack netdev_xmit_more() keep the current fallback; affected trees now use the kernel's inline, which makes the stall go away.