liquidio: replace skb_tx_hash with fallback
Subsystems (3)
PATCH 1/1 liquidio: replace skb_tx_hash with fallback
From: Satanand Burla <[email protected]>
Use fallback instead of skb_tx_hash for selecting txq
--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++-------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 11 ++--------- 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/net/ethernet/cavium/liquidio/lio_main.c +2 -8
@@ -2231,15 +2231,9 @@ static void if_cfg_callback(struct octeon_device *oct,*/ static u16 select_q (struct net_device *dev,struct sk_buff *skb,void *accel_priv __attribute__((unused)), -select_queue_fallback_t fallback __attribute__((unused))) +select_queue_fallback_t fallback) { -u32 qindex =0 ; -struct lio *lio; - - lio =GET_LIO (dev); - qindex =skb_tx_hash (dev, skb); - -return (u16)(qindex % (lio->linfo.num_txpciq)); +return fallback (dev, skb); }/** Routine to push packets arriving on Octeon interface upto network layer.
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +2 -9
@@ -1463,16 +1463,9 @@ static void if_cfg_callback(struct octeon_device *oct,*/ static u16 select_q (struct net_device *dev,struct sk_buff *skb,void *accel_priv __attribute__((unused)), -select_queue_fallback_t fallback __attribute__((unused))) +select_queue_fallback_t fallback) { -struct lio *lio; -u32 qindex; - - lio =GET_LIO (dev); - - qindex =skb_tx_hash (dev, skb); - -return (u16)(qindex % (lio->linfo.num_txpciq)); +return fallback (dev, skb); }/** Routine to push packets arriving on Octeon interface upto network layer.
Quoted 47 lines · Felix Manlunas
From: Satanand Burla <[email protected]>
Use fallback instead of
skb_tx_hashfor selecting txqSigned-off-by Satanand Burla <[email protected]>Signed-off-by Felix Manlunas <[email protected]>Signed-off-by Derek Chickles <[email protected]>--- drivers/net/ethernet/cavium/liquidio/lio_main.c | 10 ++-------- drivers/net/ethernet/cavium/liquidio/lio_vf_main.c | 11 ++--------- 2 files changed, 4 insertions(+), 17 deletions(-)drivers/net/ethernet/cavium/liquidio/lio_main.c +2
-8@@ -2231,15 +2231,9 @@ static void if_cfg_callback(struct octeon_device *oct,*/ static u16 select_q (struct net_device *dev,struct sk_buff *skb,void *accel_priv __attribute__((unused)), -select_queue_fallback_t fallback __attribute__((unused))) +select_queue_fallback_t fallback) { -u32 qindex =0 ; -struct lio *lio; - - lio =GET_LIO (dev); - qindex =skb_tx_hash (dev, skb); - -return (u16)(qindex % (lio->linfo.num_txpciq)); +return fallback (dev, skb); }/** Routine to push packets arriving on Octeon interface upto network layer. drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +1
-3@@ -1463,16 +1463,9 @@ static void if_cfg_callback(struct octeon_device *oct,*/ static u16 select_q (struct net_device *dev,struct sk_buff *skb,void *accel_priv __attribute__((unused)), -select_queue_fallback_t fallback __attribute__((unused))) +select_queue_fallback_t fallback) { -struct lio *lio; -u32 qindex;
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c static void if_cfg_callback(struct octeon_device *oct, · line 1471
Quoted 10 lines
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +1
-6- - lio =GET_LIO (dev); - - qindex =skb_tx_hash (dev, skb); - -return (u16)(qindex % (lio->linfo.num_txpciq)); +return fallback (dev, skb); }/** Routine to push packets arriving on Octeon interface upto network layer.
Why are you keeping these functions then ?
Remove them completely, and remove .ndo_select_queue from your ops.
Core networking stack will fallback automatically.
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Thu, 12 Jan 2017 11:10:18 -0800
Quoted 5 lines
Why are you keeping these functions then ?
Remove them completely, and remove .ndo_select_queue from your ops.
Core networking stack will fallback automatically.
Agreed, if all the queue selection function is doing is invoking the fallback, get rid of it.