On Wed, Feb 1, 2017 at 1:20 PM, David Laight wrote:
> From: Saeed Mahameed
>> Sent: 31 January 2017 20:59
>> Cache skb_vlan_tag_present(skb) and pass it wherever needed in xmit
>> routines.
> ...
>
> Does this actually generate better code?
Only in case skb pointer is
From: Saeed Mahameed
> Sent: 31 January 2017 20:59
> Cache skb_vlan_tag_present(skb) and pass it wherever needed in xmit
> routines.
...
Does this actually generate better code?
It is quite likely that your 'vlan_present' variable ends up being on stack.
Whereas the 'skb' is likely to be in a
Cache skb_vlan_tag_present(skb) and pass it wherever needed in xmit
routines.
Signed-off-by: Saeed Mahameed
Reviewed-by: Tariq Toukan
---
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 22 --
1 file changed, 12 insertions(+), 10