src/dpdk/drivers/net/sfc/sfc_tx.c
static unsigned int
sfc_efx_tx_maybe_insert_tag(struct sfc_efx_txq *txq, struct rte_mbuf *m,
			    efx_desc_t **pend)
{
	uint16_t this_tag = ((m->ol_flags & PKT_TX_VLAN_PKT) ?
			     m->vlan_tci : 0);

	if (this_tag == txq->hw_vlan_tci)
		return 0;

	/*
	 * The expression inside SFC_ASSERT() is not desired to be checked in
	 * a non-debug build because it might be too expensive on the data path
	 */
	SFC_ASSERT(efx_nic_cfg_get(txq->evq->sa->nic)->enc_hw_tx_insert_vlan_enabled);

	efx_tx_qdesc_vlantci_create(txq->common, rte_cpu_to_be_16(this_tag),
				    *pend);
	(*pend)++;
	txq->hw_vlan_tci = this_tag;

	return 1;
}
/*
 * The function is used to insert or update VLAN tag;
 * the firmware has state of the firmware tag to insert per TxQ
 * (controlled by option descriptors), hence, if the tag of the
 * packet to be sent is different from one remembered by the firmware,
 * the function will update it
 */
The function is used to insert or update VLAN tag;
the firmware has state of the firmware tag to insert per TxQ
(controlled by option descriptors), hence, if the tag of the
packet to be sent is different from one remembered by the firmware,
the function will update it
The function is used to insert or update VLAN tag ; the firmware has state of the firmware tag to insert per TxQ ( controlled by option descriptors ) hence if the tag of the packet to be sent is different from one remembered by the firmware the function will update it
static unsigned int
sfc_efx_tx_maybe_insert_tag(struct sfc_efx_txq *txq, struct rte_mbuf *m,
			    efx_desc_t **pend)
{
	uint16_t this_tag = ((m->ol_flags & PKT_TX_VLAN_PKT) ?
			     m->vlan_tci : 0);
	if (this_tag == txq->hw_vlan_tci)
		return 0;
	SFC_ASSERT(efx_nic_cfg_get(txq->evq->sa->nic)->enc_hw_tx_insert_vlan_enabled);
	efx_tx_qdesc_vlantci_create(txq->common, rte_cpu_to_be_16(this_tag),
				    *pend);
	(*pend)++;
	txq->hw_vlan_tci = this_tag;
	return 1;
}
static unsigned int sfc_efx_tx_maybe_insert_tag ( struct sfc_efx_txq * txq , struct rte_mbuf * m , efx_desc_t * * pend ) { uint16_t this_tag = ( ( m -> ol_flags & PKT_TX_VLAN_PKT ) ? m -> vlan_tci : 0 ) ; if ( this_tag == txq -> hw_vlan_tci ) return 0 ; SFC_ASSERT ( efx_nic_cfg_get ( txq -> evq -> sa -> nic ) -> enc_hw_tx_insert_vlan_enabled ) ; efx_tx_qdesc_vlantci_create ( txq -> common , rte_cpu_to_be_16 ( this_tag ) , * pend ) ; ( * pend ) ++ ; txq -> hw_vlan_tci = this_tag ; return 1 ; }
The function is used to insert or update VLAN tag;
 the firmware has state of the firmware tag to insert per TxQ
 (controlled by option descriptors), hence, if the tag of the
 packet to be sent is different from one remembered by the firmware,
 the function will update it
The function is used to insert or update VLAN tag ; the firmware has state of the firmware tag to insert per TxQ ( controlled by option descriptors ) hence if the tag of the packet to be sent is different from one remembered by the firmware the function will update it
/*
	 * The expression inside SFC_ASSERT() is not desired to be checked in
	 * a non-debug build because it might be too expensive on the data path
	 */