Re: [PATCH V3 net 1/2] net: hns: fix wrong head when modify the tx feature when sending packets

From: Jijie Shao
Date: Wed Dec 06 2023 - 07:31:50 EST



on 2023/12/6 19:18, Paolo Abeni wrote:
+ priv->ops.fill_desc = fill_desc_v2;
+ priv->ops.maybe_stop_tx = hns_nic_maybe_stop_tx_v2;
Side note: since both 'fill_desc' and 'maybe_stop_tx' have constant
values, for net-next you should really consider replacing the function
pointers with direct-calls.

You currently have at least 2 indirect calls per wire packet, which
hurt performances a lot in case security issues mitigations are in
place.

Cheers,

Paolo

Thank you for your advice. Currently, because the hardware behavior is different, the two versions of ops are retained to unify the subsequent process. We will try to unify the two version ops, and if that does not work, we will consider maintaining the status quo. Thanks again! Jijie