Lines Matching refs:rxcp
2252 struct be_rx_compl_info *rxcp) in be_rx_stats_update() argument
2258 stats->rx_bytes += rxcp->pkt_size; in be_rx_stats_update()
2260 if (rxcp->tunneled) in be_rx_stats_update()
2262 if (rxcp->pkt_type == BE_MULTICAST_PACKET) in be_rx_stats_update()
2264 if (rxcp->err) in be_rx_stats_update()
2269 static inline bool csum_passed(struct be_rx_compl_info *rxcp) in csum_passed() argument
2274 return (rxcp->tcpf || rxcp->udpf) && rxcp->l4_csum && in csum_passed()
2275 (rxcp->ip_csum || rxcp->ipv6) && !rxcp->err; in csum_passed()
2306 struct be_rx_compl_info *rxcp) in be_rx_compl_discard() argument
2309 u16 i, num_rcvd = rxcp->num_rcvd; in be_rx_compl_discard()
2323 struct be_rx_compl_info *rxcp) in skb_fill_rx_data() argument
2335 curr_frag_len = min(rxcp->pkt_size, rx_frag_size); in skb_fill_rx_data()
2359 if (rxcp->pkt_size <= rx_frag_size) { in skb_fill_rx_data()
2360 BUG_ON(rxcp->num_rcvd != 1); in skb_fill_rx_data()
2365 remaining = rxcp->pkt_size - curr_frag_len; in skb_fill_rx_data()
2366 for (i = 1, j = 0; i < rxcp->num_rcvd; i++) { in skb_fill_rx_data()
2395 struct be_rx_compl_info *rxcp) in be_rx_compl_process() argument
2404 be_rx_compl_discard(rxo, rxcp); in be_rx_compl_process()
2408 skb_fill_rx_data(rxo, skb, rxcp); in be_rx_compl_process()
2410 if (likely((netdev->features & NETIF_F_RXCSUM) && csum_passed(rxcp))) in be_rx_compl_process()
2418 skb_set_hash(skb, rxcp->rss_hash, PKT_HASH_TYPE_L3); in be_rx_compl_process()
2420 skb->csum_level = rxcp->tunneled; in be_rx_compl_process()
2423 if (rxcp->vlanf) in be_rx_compl_process()
2424 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rxcp->vlan_tag); in be_rx_compl_process()
2432 struct be_rx_compl_info *rxcp) in be_rx_compl_process_gro() argument
2442 be_rx_compl_discard(rxo, rxcp); in be_rx_compl_process_gro()
2446 remaining = rxcp->pkt_size; in be_rx_compl_process_gro()
2447 for (i = 0, j = -1; i < rxcp->num_rcvd; i++) { in be_rx_compl_process_gro()
2471 skb->len = rxcp->pkt_size; in be_rx_compl_process_gro()
2472 skb->data_len = rxcp->pkt_size; in be_rx_compl_process_gro()
2476 skb_set_hash(skb, rxcp->rss_hash, PKT_HASH_TYPE_L3); in be_rx_compl_process_gro()
2478 skb->csum_level = rxcp->tunneled; in be_rx_compl_process_gro()
2480 if (rxcp->vlanf) in be_rx_compl_process_gro()
2481 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), rxcp->vlan_tag); in be_rx_compl_process_gro()
2487 struct be_rx_compl_info *rxcp) in be_parse_rx_compl_v1() argument
2489 rxcp->pkt_size = GET_RX_COMPL_V1_BITS(pktsize, compl); in be_parse_rx_compl_v1()
2490 rxcp->vlanf = GET_RX_COMPL_V1_BITS(vtp, compl); in be_parse_rx_compl_v1()
2491 rxcp->err = GET_RX_COMPL_V1_BITS(err, compl); in be_parse_rx_compl_v1()
2492 rxcp->tcpf = GET_RX_COMPL_V1_BITS(tcpf, compl); in be_parse_rx_compl_v1()
2493 rxcp->udpf = GET_RX_COMPL_V1_BITS(udpf, compl); in be_parse_rx_compl_v1()
2494 rxcp->ip_csum = GET_RX_COMPL_V1_BITS(ipcksm, compl); in be_parse_rx_compl_v1()
2495 rxcp->l4_csum = GET_RX_COMPL_V1_BITS(l4_cksm, compl); in be_parse_rx_compl_v1()
2496 rxcp->ipv6 = GET_RX_COMPL_V1_BITS(ip_version, compl); in be_parse_rx_compl_v1()
2497 rxcp->num_rcvd = GET_RX_COMPL_V1_BITS(numfrags, compl); in be_parse_rx_compl_v1()
2498 rxcp->pkt_type = GET_RX_COMPL_V1_BITS(cast_enc, compl); in be_parse_rx_compl_v1()
2499 rxcp->rss_hash = GET_RX_COMPL_V1_BITS(rsshash, compl); in be_parse_rx_compl_v1()
2500 if (rxcp->vlanf) { in be_parse_rx_compl_v1()
2501 rxcp->qnq = GET_RX_COMPL_V1_BITS(qnq, compl); in be_parse_rx_compl_v1()
2502 rxcp->vlan_tag = GET_RX_COMPL_V1_BITS(vlan_tag, compl); in be_parse_rx_compl_v1()
2504 rxcp->port = GET_RX_COMPL_V1_BITS(port, compl); in be_parse_rx_compl_v1()
2505 rxcp->tunneled = in be_parse_rx_compl_v1()
2510 struct be_rx_compl_info *rxcp) in be_parse_rx_compl_v0() argument
2512 rxcp->pkt_size = GET_RX_COMPL_V0_BITS(pktsize, compl); in be_parse_rx_compl_v0()
2513 rxcp->vlanf = GET_RX_COMPL_V0_BITS(vtp, compl); in be_parse_rx_compl_v0()
2514 rxcp->err = GET_RX_COMPL_V0_BITS(err, compl); in be_parse_rx_compl_v0()
2515 rxcp->tcpf = GET_RX_COMPL_V0_BITS(tcpf, compl); in be_parse_rx_compl_v0()
2516 rxcp->udpf = GET_RX_COMPL_V0_BITS(udpf, compl); in be_parse_rx_compl_v0()
2517 rxcp->ip_csum = GET_RX_COMPL_V0_BITS(ipcksm, compl); in be_parse_rx_compl_v0()
2518 rxcp->l4_csum = GET_RX_COMPL_V0_BITS(l4_cksm, compl); in be_parse_rx_compl_v0()
2519 rxcp->ipv6 = GET_RX_COMPL_V0_BITS(ip_version, compl); in be_parse_rx_compl_v0()
2520 rxcp->num_rcvd = GET_RX_COMPL_V0_BITS(numfrags, compl); in be_parse_rx_compl_v0()
2521 rxcp->pkt_type = GET_RX_COMPL_V0_BITS(cast_enc, compl); in be_parse_rx_compl_v0()
2522 rxcp->rss_hash = GET_RX_COMPL_V0_BITS(rsshash, compl); in be_parse_rx_compl_v0()
2523 if (rxcp->vlanf) { in be_parse_rx_compl_v0()
2524 rxcp->qnq = GET_RX_COMPL_V0_BITS(qnq, compl); in be_parse_rx_compl_v0()
2525 rxcp->vlan_tag = GET_RX_COMPL_V0_BITS(vlan_tag, compl); in be_parse_rx_compl_v0()
2527 rxcp->port = GET_RX_COMPL_V0_BITS(port, compl); in be_parse_rx_compl_v0()
2528 rxcp->ip_frag = GET_RX_COMPL_V0_BITS(ip_frag, compl); in be_parse_rx_compl_v0()
2534 struct be_rx_compl_info *rxcp = &rxo->rxcp; in be_rx_compl_get() local
2546 be_parse_rx_compl_v1(compl, rxcp); in be_rx_compl_get()
2548 be_parse_rx_compl_v0(compl, rxcp); in be_rx_compl_get()
2550 if (rxcp->ip_frag) in be_rx_compl_get()
2551 rxcp->l4_csum = 0; in be_rx_compl_get()
2553 if (rxcp->vlanf) { in be_rx_compl_get()
2558 if (be_is_qnq_mode(adapter) && !rxcp->qnq) in be_rx_compl_get()
2559 rxcp->vlanf = 0; in be_rx_compl_get()
2562 rxcp->vlan_tag = swab16(rxcp->vlan_tag); in be_rx_compl_get()
2564 if (adapter->pvid == (rxcp->vlan_tag & VLAN_VID_MASK) && in be_rx_compl_get()
2565 !test_bit(rxcp->vlan_tag, adapter->vids)) in be_rx_compl_get()
2566 rxcp->vlanf = 0; in be_rx_compl_get()
2573 return rxcp; in be_rx_compl_get()
2830 struct be_rx_compl_info *rxcp; in be_rx_cq_clean() local
2841 rxcp = be_rx_compl_get(rxo); in be_rx_cq_clean()
2842 if (!rxcp) { in be_rx_cq_clean()
2856 be_rx_compl_discard(rxo, rxcp); in be_rx_cq_clean()
2858 if (rxcp->num_rcvd == 0) in be_rx_cq_clean()
3201 static inline bool do_gro(struct be_rx_compl_info *rxcp) in do_gro() argument
3203 return (rxcp->tcpf && !rxcp->err && rxcp->l4_csum) ? true : false; in do_gro()
3211 struct be_rx_compl_info *rxcp; in be_process_rx() local
3216 rxcp = be_rx_compl_get(rxo); in be_process_rx()
3217 if (!rxcp) in be_process_rx()
3221 if (unlikely(rxcp->num_rcvd == 0)) in be_process_rx()
3225 if (unlikely(!rxcp->pkt_size)) { in be_process_rx()
3226 be_rx_compl_discard(rxo, rxcp); in be_process_rx()
3233 if (unlikely(rxcp->port != adapter->port_num && in be_process_rx()
3235 be_rx_compl_discard(rxo, rxcp); in be_process_rx()
3239 if (do_gro(rxcp)) in be_process_rx()
3240 be_rx_compl_process_gro(rxo, napi, rxcp); in be_process_rx()
3242 be_rx_compl_process(rxo, napi, rxcp); in be_process_rx()
3245 frags_consumed += rxcp->num_rcvd; in be_process_rx()
3246 be_rx_stats_update(rxo, rxcp); in be_process_rx()