git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mbuf: expand ol_flags field to 64-bits
[dpdk.git]
/
lib
/
librte_pmd_e1000
/
igb_rxtx.c
diff --git
a/lib/librte_pmd_e1000/igb_rxtx.c
b/lib/librte_pmd_e1000/igb_rxtx.c
index
41727e7
..
56d1dfc
100644
(file)
--- a/
lib/librte_pmd_e1000/igb_rxtx.c
+++ b/
lib/librte_pmd_e1000/igb_rxtx.c
@@
-175,7
+175,7
@@
union igb_vlan_macip {
* Strucutre to check if new context need be built
*/
struct igb_advctx_info {
* Strucutre to check if new context need be built
*/
struct igb_advctx_info {
- uint
16
_t flags; /**< ol_flags related to context build. */
+ uint
64
_t flags; /**< ol_flags related to context build. */
uint32_t cmp_mask; /**< compare mask for vlan_macip_lens */
union igb_vlan_macip vlan_macip_lens; /**< vlan, mac & ip length. */
};
uint32_t cmp_mask; /**< compare mask for vlan_macip_lens */
union igb_vlan_macip vlan_macip_lens; /**< vlan, mac & ip length. */
};
@@
-243,7
+243,7
@@
struct igb_tx_queue {
static inline void
igbe_set_xmit_ctx(struct igb_tx_queue* txq,
volatile struct e1000_adv_tx_context_desc *ctx_txd,
static inline void
igbe_set_xmit_ctx(struct igb_tx_queue* txq,
volatile struct e1000_adv_tx_context_desc *ctx_txd,
- uint
16
_t ol_flags, uint32_t vlan_macip_lens)
+ uint
64
_t ol_flags, uint32_t vlan_macip_lens)
{
uint32_t type_tucmd_mlhl;
uint32_t mss_l4len_idx;
{
uint32_t type_tucmd_mlhl;
uint32_t mss_l4len_idx;
@@
-308,7
+308,7
@@
igbe_set_xmit_ctx(struct igb_tx_queue* txq,
* or create a new context descriptor.
*/
static inline uint32_t
* or create a new context descriptor.
*/
static inline uint32_t
-what_advctx_update(struct igb_tx_queue *txq, uint
16
_t flags,
+what_advctx_update(struct igb_tx_queue *txq, uint
64
_t flags,
uint32_t vlan_macip_lens)
{
/* If match with the current context */
uint32_t vlan_macip_lens)
{
/* If match with the current context */
@@
-331,7
+331,7
@@
what_advctx_update(struct igb_tx_queue *txq, uint16_t flags,
}
static inline uint32_t
}
static inline uint32_t
-tx_desc_cksum_flags_to_olinfo(uint
16
_t ol_flags)
+tx_desc_cksum_flags_to_olinfo(uint
64
_t ol_flags)
{
static const uint32_t l4_olinfo[2] = {0, E1000_ADVTXD_POPTS_TXSM};
static const uint32_t l3_olinfo[2] = {0, E1000_ADVTXD_POPTS_IXSM};
{
static const uint32_t l4_olinfo[2] = {0, E1000_ADVTXD_POPTS_TXSM};
static const uint32_t l3_olinfo[2] = {0, E1000_ADVTXD_POPTS_IXSM};
@@
-343,7
+343,7
@@
tx_desc_cksum_flags_to_olinfo(uint16_t ol_flags)
}
static inline uint32_t
}
static inline uint32_t
-tx_desc_vlan_flags_to_cmdtype(uint
16
_t ol_flags)
+tx_desc_vlan_flags_to_cmdtype(uint
64
_t ol_flags)
{
static uint32_t vlan_cmd[2] = {0, E1000_ADVTXD_DCMD_VLE};
return vlan_cmd[(ol_flags & PKT_TX_VLAN_PKT) != 0];
{
static uint32_t vlan_cmd[2] = {0, E1000_ADVTXD_DCMD_VLE};
return vlan_cmd[(ol_flags & PKT_TX_VLAN_PKT) != 0];
@@
-366,12
+366,12
@@
eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint32_t cmd_type_len;
uint32_t pkt_len;
uint16_t slen;
uint32_t cmd_type_len;
uint32_t pkt_len;
uint16_t slen;
- uint
16
_t ol_flags;
+ uint
64
_t ol_flags;
uint16_t tx_end;
uint16_t tx_id;
uint16_t tx_last;
uint16_t nb_tx;
uint16_t tx_end;
uint16_t tx_id;
uint16_t tx_last;
uint16_t nb_tx;
- uint
16
_t tx_ol_req;
+ uint
64
_t tx_ol_req;
uint32_t new_ctx = 0;
uint32_t ctx = 0;
uint32_t new_ctx = 0;
uint32_t ctx = 0;
@@
-400,7
+400,7
@@
eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
ol_flags = tx_pkt->ol_flags;
vlan_macip_lens.f.vlan_tci = tx_pkt->vlan_tci;
vlan_macip_lens.f.l2_l3_len = tx_pkt->l2_l3_len;
ol_flags = tx_pkt->ol_flags;
vlan_macip_lens.f.vlan_tci = tx_pkt->vlan_tci;
vlan_macip_lens.f.l2_l3_len = tx_pkt->l2_l3_len;
- tx_ol_req =
(uint16_t)(ol_flags & PKT_TX_OFFLOAD_MASK)
;
+ tx_ol_req =
ol_flags & PKT_TX_OFFLOAD_MASK
;
/* If a Context Descriptor need be built . */
if (tx_ol_req) {
/* If a Context Descriptor need be built . */
if (tx_ol_req) {
@@
-587,12
+587,12
@@
eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
* RX functions
*
**********************************************************************/
* RX functions
*
**********************************************************************/
-static inline uint
16
_t
+static inline uint
64
_t
rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
{
rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
{
- uint
16
_t pkt_flags;
+ uint
64
_t pkt_flags;
- static uint
16
_t ip_pkt_types_map[16] = {
+ static uint
64
_t ip_pkt_types_map[16] = {
0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT,
PKT_RX_IPV6_HDR, 0, 0, 0,
PKT_RX_IPV6_HDR_EXT, 0, 0, 0,
0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT,
PKT_RX_IPV6_HDR, 0, 0, 0,
PKT_RX_IPV6_HDR_EXT, 0, 0, 0,
@@
-605,34
+605,32
@@
rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs)
0, 0, 0, 0,
};
0, 0, 0, 0,
};
- pkt_flags = (
uint16_t)((
hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ?
+ pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ?
ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] :
ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] :
- ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]
)
;
+ ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F];
#else
#else
- pkt_flags = (
uint16_t)((
hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? 0 :
- ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]
)
;
+ pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? 0 :
+ ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F];
#endif
#endif
- return (uint16_t)(pkt_flags | (((hl_tp_rs & 0x0F) == 0) ?
- 0 : PKT_RX_RSS_HASH));
+ return pkt_flags | (((hl_tp_rs & 0x0F) == 0) ? 0 : PKT_RX_RSS_HASH);
}
}
-static inline uint
16
_t
+static inline uint
64
_t
rx_desc_status_to_pkt_flags(uint32_t rx_status)
{
rx_desc_status_to_pkt_flags(uint32_t rx_status)
{
- uint
16
_t pkt_flags;
+ uint
64
_t pkt_flags;
/* Check if VLAN present */
/* Check if VLAN present */
- pkt_flags = (uint16_t)((rx_status & E1000_RXD_STAT_VP) ?
- PKT_RX_VLAN_PKT : 0);
+ pkt_flags = (rx_status & E1000_RXD_STAT_VP) ? PKT_RX_VLAN_PKT : 0;
#if defined(RTE_LIBRTE_IEEE1588)
if (rx_status & E1000_RXD_STAT_TMST)
#if defined(RTE_LIBRTE_IEEE1588)
if (rx_status & E1000_RXD_STAT_TMST)
- pkt_flags =
(uint16_t)(pkt_flags | PKT_RX_IEEE1588_TMST)
;
+ pkt_flags =
pkt_flags | PKT_RX_IEEE1588_TMST
;
#endif
return pkt_flags;
}
#endif
return pkt_flags;
}
-static inline uint
16
_t
+static inline uint
64
_t
rx_desc_error_to_pkt_flags(uint32_t rx_status)
{
/*
rx_desc_error_to_pkt_flags(uint32_t rx_status)
{
/*
@@
-640,7
+638,7
@@
rx_desc_error_to_pkt_flags(uint32_t rx_status)
* Bit 29: L4I, L4I integrity error
*/
* Bit 29: L4I, L4I integrity error
*/
- static uint
16
_t error_to_pkt_flags_map[4] = {
+ static uint
64
_t error_to_pkt_flags_map[4] = {
0, PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD,
PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD
};
0, PKT_RX_L4_CKSUM_BAD, PKT_RX_IP_CKSUM_BAD,
PKT_RX_IP_CKSUM_BAD | PKT_RX_L4_CKSUM_BAD
};
@@
-667,7
+665,7
@@
eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t rx_id;
uint16_t nb_rx;
uint16_t nb_hold;
uint16_t rx_id;
uint16_t nb_rx;
uint16_t nb_hold;
- uint
16
_t pkt_flags;
+ uint
64
_t pkt_flags;
nb_rx = 0;
nb_hold = 0;
nb_rx = 0;
nb_hold = 0;
@@
-786,10
+784,8
@@
eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
- pkt_flags = (uint16_t)(pkt_flags |
- rx_desc_status_to_pkt_flags(staterr));
- pkt_flags = (uint16_t)(pkt_flags |
- rx_desc_error_to_pkt_flags(staterr));
+ pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr);
+ pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
rxm->ol_flags = pkt_flags;
/*
rxm->ol_flags = pkt_flags;
/*
@@
-846,7
+842,7
@@
eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_rx;
uint16_t nb_hold;
uint16_t data_len;
uint16_t nb_rx;
uint16_t nb_hold;
uint16_t data_len;
- uint
16
_t pkt_flags;
+ uint
64
_t pkt_flags;
nb_rx = 0;
nb_hold = 0;
nb_rx = 0;
nb_hold = 0;
@@
-1022,10
+1018,8
@@
eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
first_seg->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
first_seg->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan);
hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data);
pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss);
- pkt_flags = (uint16_t)(pkt_flags |
- rx_desc_status_to_pkt_flags(staterr));
- pkt_flags = (uint16_t)(pkt_flags |
- rx_desc_error_to_pkt_flags(staterr));
+ pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr);
+ pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr);
first_seg->ol_flags = pkt_flags;
/* Prefetch data of first segment, if configured to do so. */
first_seg->ol_flags = pkt_flags;
/* Prefetch data of first segment, if configured to do so. */