Re: [net-next 5/8] net/mlx5e: Calc vlan_tag_present only once on xmit

2017-02-05 Thread Saeed Mahameed
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

RE: [net-next 5/8] net/mlx5e: Calc vlan_tag_present only once on xmit

2017-02-01 Thread David Laight
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

[net-next 5/8] net/mlx5e: Calc vlan_tag_present only once on xmit

2017-01-31 Thread Saeed Mahameed
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