eal: introduce macro for always inline
[dpdk.git] / drivers / net / ixgbe / ixgbe_rxtx.c
index eb7960b..ee8ad96 100644 (file)
@@ -126,7 +126,7 @@ uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
  * Check for descriptors with their DD bit set and free mbufs.
  * Return the total number of buffers freed.
  */
-static inline int __attribute__((always_inline))
+static __rte_always_inline int
 ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)
 {
        struct ixgbe_tx_entry *txep;
@@ -147,7 +147,7 @@ ixgbe_tx_free_bufs(struct ixgbe_tx_queue *txq)
 
        for (i = 0; i < txq->tx_rs_thresh; ++i, ++txep) {
                /* free buffers one at a time */
-               m = __rte_pktmbuf_prefree_seg(txep->mbuf);
+               m = rte_pktmbuf_prefree_seg(txep->mbuf);
                txep->mbuf = NULL;
 
                if (unlikely(m == NULL))
@@ -1585,8 +1585,6 @@ ixgbe_rx_alloc_bufs(struct ixgbe_rx_queue *rxq, bool reset_mbuf)
                /* populate the static rte mbuf fields */
                mb = rxep[i].mbuf;
                if (reset_mbuf) {
-                       mb->next = NULL;
-                       mb->nb_segs = 1;
                        mb->port = rxq->port_id;
                }
 
@@ -2194,12 +2192,6 @@ next_desc:
                        goto next_desc;
                }
 
-               /*
-                * This is the last buffer of the received packet - return
-                * the current cluster to the user.
-                */
-               rxm->next = NULL;
-
                /* Initialize the first mbuf of the returned packet */
                ixgbe_fill_cluster_head_buf(first_seg, &rxd, rxq, staterr);
 
@@ -4530,6 +4522,7 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
        bool rsc_capable = false;
        uint16_t i;
        uint32_t rdrxctl;
+       uint32_t rfctl;
 
        /* Sanity check */
        dev->dev_ops->dev_infos_get(dev, &dev_info);
@@ -4557,22 +4550,18 @@ ixgbe_set_rsc(struct rte_eth_dev *dev)
        }
 
        /* RFCTL configuration  */
-       if (rsc_capable) {
-               uint32_t rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
-
-               if (rx_conf->enable_lro)
-                       /*
-                        * Since NFS packets coalescing is not supported - clear
-                        * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
-                        * enabled.
-                        */
-                       rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
-                                  IXGBE_RFCTL_NFSR_DIS);
-               else
-                       rfctl |= IXGBE_RFCTL_RSC_DIS;
-
-               IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
-       }
+       rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL);
+       if ((rsc_capable) && (rx_conf->enable_lro))
+               /*
+                * Since NFS packets coalescing is not supported - clear
+                * RFCTL.NFSW_DIS and RFCTL.NFSR_DIS when RSC is
+                * enabled.
+                */
+               rfctl &= ~(IXGBE_RFCTL_RSC_DIS | IXGBE_RFCTL_NFSW_DIS |
+                          IXGBE_RFCTL_NFSR_DIS);
+       else
+               rfctl |= IXGBE_RFCTL_RSC_DIS;
+       IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl);
 
        /* If LRO hasn't been requested - we are done here. */
        if (!rx_conf->enable_lro)