Skip to content

ice: kcompat: only backport netdev_xmit_more() when kernel lacks it#67

Open
RomeoLLee wants to merge 1 commit into
intel:mainfrom
RomeoLLee:fix-netdev-xmit-more
Open

ice: kcompat: only backport netdev_xmit_more() when kernel lacks it#67
RomeoLLee wants to merge 1 commit into
intel:mainfrom
RomeoLLee:fix-netdev-xmit-more

Conversation

@RomeoLLee

Copy link
Copy Markdown

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant