What I mean is just compile the .o file with and without the unlikely(). $ md5sum drivers/net/ethernet/ti/icssg/icssg_common. o* 2de875935222b9ecd8483e61848c4fc9 drivers/net/ethernet/ti/icssg/ icssg_common. o. annotation 2de875935222b9ecd8483e61848c4fc9
ZjQcmQRYFpfptBannerStart
This message was sent from outside of Texas Instruments.
Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
Report Suspicious
<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/G3vK! uldq3TevVoc7KuXEXHnDf- TXtuZ0bON9iO0jTE7PyIS1jjfs_CzpvIiMi93PVt0MVDzjHGQSK__vY_-6rO7q86rFmBMGW4SSqK5pvNE$>
ZjQcmQRYFpfptBannerEnd
What I mean is just compile the .o file with and without the unlikely().
$ md5sum drivers/net/ethernet/ti/icssg/icssg_common.o*
2de875935222b9ecd8483e61848c4fc9 drivers/net/ethernet/ti/icssg/icssg_common.o.annotation
2de875935222b9ecd8483e61848c4fc9 drivers/net/ethernet/ti/icssg/icssg_common.o.no_anotation
Generally the rule is that you should leave likely/unlikely() annotations
out unless it's going to make a difference on a benchmark. I'm not going
to jump down people's throat about this, and if you want to leave it,
it's fine. But it just struct me as weird so that's why I commented on
it.
regards,
dan carpenter
diff --git a/drivers/net/ethernet/ti/icssg/icssg_common.c b/drivers/net/ethernet/ti/icssg/icssg_common.c
index 34d16e00c2ec..3db5bae44e61 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_common.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_common.c
@@ -672,7 +672,7 @@ static int emac_run_xdp(struct prueth_emac *emac, struct xdp_buff *xdp,
case XDP_TX:
/* Send packet to TX ring for immediate transmission */
xdpf = xdp_convert_buff_to_frame(xdp);
- if (unlikely(!xdpf))
+ if (!xdpf)
goto drop;
q_idx = smp_processor_id() % emac->tx_ch_num;