net: removes duplicate skb_mark_napi_id() calls.
Subsystems (5)
Networking Network drivers Intel Ethernet Broadcom bnxt_en 50 gigabit Ethernet driver +1 more subsystems
PATCH 1/1 net: removes duplicate skb_mark_napi_id() calls.
Because napi_gro_receive() function calls skb_mark_napi_id() function, it doesn't need to set it twice.
Signed-off-by Weongyo Jeong <[email protected]>
--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++++------ drivers/net/ethernet/cisco/enic/enic_main.c | 7 ++++--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++++--- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +-- 4 files changed, 17 insertions(+), 14 deletions(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +8 -6
@@ -1112,11 +1112,12 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, rc = -ENOMEM ;if (likely (skb)) {skb_record_rx_queue (skb, bnapi->index); -skb_mark_napi_id (skb, &bnapi->napi); -if (bnxt_busy_polling (bnapi)) +if (bnxt_busy_polling (bnapi)) { +skb_mark_napi_id (skb, &bnapi->napi);netif_receive_skb (skb); -else + }else {napi_gro_receive (&bnapi->napi, skb); + } rc =1 ; } goto next_rx_no_prod;
@@ -1215,11 +1216,12 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, }skb_record_rx_queue (skb, bnapi->index); -skb_mark_napi_id (skb, &bnapi->napi); -if (bnxt_busy_polling (bnapi)) +if (bnxt_busy_polling (bnapi)) { +skb_mark_napi_id (skb, &bnapi->napi);netif_receive_skb (skb); -else + }else {napi_gro_receive (&bnapi->napi, skb); + } rc =1 ; next_rx:
drivers/net/ethernet/cisco/enic/enic_main.c +4 -3
@@ -1186,12 +1186,13 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq,if (vlan_stripped)__vlan_hwaccel_put_tag (skb,htons (ETH_P_8021Q ), vlan_tci); -skb_mark_napi_id (skb, &enic->napi[rq->index]);if (enic_poll_busy_polling (rq) || - !(netdev->features &NETIF_F_GRO )) + !(netdev->features &NETIF_F_GRO )) { +skb_mark_napi_id (skb, &enic->napi[rq->index]);netif_receive_skb (skb); -else + }else {napi_gro_receive (&enic->napi[q_number], skb); + }if (enic->rx_coalesce_setting.use_adaptive_rx_coalesce)enic_intr_update_pkt_size (&cq->pkt_size_counter, bytes_written);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +4 -3
@@ -1659,11 +1659,12 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,static void ixgbe_rx_skb (struct ixgbe_q_vector *q_vector,struct sk_buff *skb) { -skb_mark_napi_id (skb, &q_vector->napi); -if (ixgbe_qv_busy_polling (q_vector)) +if (ixgbe_qv_busy_polling (q_vector)) { +skb_mark_napi_id (skb, &q_vector->napi);netif_receive_skb (skb); -else + }else {napi_gro_receive (&q_vector->napi, skb); + } }/**
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +1 -2
@@ -447,9 +447,8 @@ static void ixgbevf_rx_skb(struct ixgbevf_q_vector *q_vector, struct sk_buff *skb) {#ifdef CONFIG_NET_RX_BUSY_POLL -skb_mark_napi_id (skb, &q_vector->napi); -if (ixgbevf_qv_busy_polling (q_vector)) { +skb_mark_napi_id (skb, &q_vector->napi);netif_receive_skb (skb);/* exit early if we busy polled */ return ;
Signature · 1 line
2.1.3
David Miller
maintainerFrom: Weongyo Jeong <[email protected]>
Date: Wed, 16 Mar 2016 10:04:53 -0700
Quoted 4 lines
Because
napi_gro_receive()function callsskb_mark_napi_id()function, it doesn't need to set it twice.Signed-off-by Weongyo Jeong <[email protected]>
Unless you can show a significant performance argument, or other significant improvement resulting from this patch, I am not applying it.