Lines Matching refs:packet

103     IN  lm_packet_t     *packet,  in lm_pre_process_lso_packet()  argument
131 packet->u1.tx.hdr_nbds = hdr_nbds; in lm_pre_process_lso_packet()
134 static void lm_process_lso_packet(IN lm_packet_t *packet, in lm_process_lso_packet() argument
150 if ((packet->l2pkt_tx_info->lso_ip_hdr_len + packet->l2pkt_tx_info->lso_tcp_hdr_len) > 120) { in lm_process_lso_packet()
158 parse_bd_e1x->lso_mss = mm_cpu_to_le16(packet->l2pkt_tx_info->lso_mss); in lm_process_lso_packet()
159 parse_bd_e1x->ip_id = mm_cpu_to_le16(packet->l2pkt_tx_info->lso_ipid); in lm_process_lso_packet()
160 parse_bd_e1x->tcp_send_seq = mm_cpu_to_le32(packet->l2pkt_tx_info->lso_tcp_send_seq); in lm_process_lso_packet()
161 …parse_bd_e1x->tcp_flags = packet->l2pkt_tx_info->lso_tcp_flags; // no endianity since it is… in lm_process_lso_packet()
167 if GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_TCP_LSO_SNAP_FRAME) in lm_process_lso_packet()
175 …parse_bd_e2->parsing_data |= ETH_TX_PARSE_BD_E2_LSO_MSS & (packet->l2pkt_tx_info->lso_mss << ETH_T… in lm_process_lso_packet()
180 SET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_COMPUTE_TCP_UDP_CKSUM); in lm_process_lso_packet()
182 if (!GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IPV6_PACKET)) in lm_process_lso_packet()
184 SET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_COMPUTE_IP_CKSUM); in lm_process_lso_packet()
190 …start_bd->general_data |= ((packet->u1.tx.hdr_nbds & ETH_TX_START_BD_HDR_NBDS) << ETH_TX_START_BD_… in lm_process_lso_packet()
246 packet->size += (*frag)->size; in lm_process_lso_packet()
474 lm_packet_t *packet) in lm_get_pri_from_send_packet_param() argument
479 …if GET_FLAGS(packet->l2pkt_tx_info->flags , (LM_TX_FLAG_INSERT_VLAN_TAG | LM_TX_FLAG_VLAN_TAG_EXIS… in lm_get_pri_from_send_packet_param()
481 DbgMessage(pdev, INFORMl2, "Outband vlan 0X%x\n",packet->l2pkt_tx_info->vlan_tag); in lm_get_pri_from_send_packet_param()
483 pri = LM_GET_PRI_FROM_VLAN(packet->l2pkt_tx_info->vlan_tag); in lm_get_pri_from_send_packet_param()
492 lm_packet_t *packet, in fill_bds_for_encapsulated_packet() argument
502 packet->l2pkt_tx_info->dst_mac_addr); in fill_bds_for_encapsulated_packet()
505 tunnel_data->ip_hdr_start_inner_w = (packet->l2pkt_tx_info->encap_packet_inner_frame_offset + in fill_bds_for_encapsulated_packet()
506packet->l2pkt_tx_info->encap_packet_inner_ip_relative_offset) >> 1; in fill_bds_for_encapsulated_packet()
509 tunnel_data->pseudo_csum = mm_cpu_to_le16(packet->l2pkt_tx_info->tcp_pseudo_csum); in fill_bds_for_encapsulated_packet()
511 tunnel_data->fw_ip_hdr_csum = mm_cpu_to_le16(packet->l2pkt_tx_info->fw_ip_csum); in fill_bds_for_encapsulated_packet()
513 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IPV6_PACKET)) in fill_bds_for_encapsulated_packet()
527 if (!(GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IPV6_PACKET))) in fill_bds_for_encapsulated_packet()
530 …parse_bd_2nd_ptr->global_data |= ( ((packet->l2pkt_tx_info->lso_ip_hdr_len) >> 1) << ETH_TX_PARSE_… in fill_bds_for_encapsulated_packet()
534 …parse_bd_2nd_ptr->global_data |= (packet->l2pkt_tx_info->tcp_nonce_sum_bit << ETH_TX_PARSE_2ND_BD_… in fill_bds_for_encapsulated_packet()
537 parse_bd_2nd_ptr->tcp_send_seq = mm_cpu_to_le32(packet->l2pkt_tx_info->lso_tcp_send_seq); in fill_bds_for_encapsulated_packet()
538 …parse_bd_2nd_ptr->tcp_flags = packet->l2pkt_tx_info->lso_tcp_flags; // no endianity since it… in fill_bds_for_encapsulated_packet()
544 …parse_bd_2nd_ptr->fw_ip_csum_wo_len_flags_frag = mm_cpu_to_le16(packet->l2pkt_tx_info->fw_ip_csum); in fill_bds_for_encapsulated_packet()
545 … parse_bd_2nd_ptr->hw_ip_id = mm_cpu_to_le16(packet->l2pkt_tx_info->lso_ipid); in fill_bds_for_encapsulated_packet()
547 …parse_bd_2nd_ptr->fw_ip_hdr_to_payload_w = (packet->l2pkt_tx_info->encap_packet_inner_frame_offset… in fill_bds_for_encapsulated_packet()
548packet->l2pkt_tx_info->encap_packet_inner_ip_relative_offset + in fill_bds_for_encapsulated_packet()
549packet->l2pkt_tx_info->encap_packet_inner_tcp_relative_offset + in fill_bds_for_encapsulated_packet()
550 packet->l2pkt_tx_info->lso_tcp_hdr_len - in fill_bds_for_encapsulated_packet()
553 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IPV6_PACKET)) in fill_bds_for_encapsulated_packet()
578 lm_packet_t *packet, in lm_send_packet() argument
614 if GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_VLAN_TAG_EXISTS) in lm_send_packet()
619 if GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_TCP_LSO_SNAP_FRAME) in lm_send_packet()
624 … is_encapsulated_offload = (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IS_ENCAP_PACKET) && in lm_send_packet()
625 …GET_FLAGS(packet->l2pkt_tx_info->flags, (LM_TX_FLAG_COMPUTE_IP_CKSUM | LM_TX_FLAG_COMPUTE_TCP_UDP_… in lm_send_packet()
629 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_TCP_LSO_FRAME)) in lm_send_packet()
635 total_hlen_bytes = packet->l2pkt_tx_info->encap_packet_inner_frame_offset + in lm_send_packet()
636 packet->l2pkt_tx_info->encap_packet_inner_ip_relative_offset + in lm_send_packet()
637 packet->l2pkt_tx_info->encap_packet_inner_tcp_relative_offset + in lm_send_packet()
638 packet->l2pkt_tx_info->lso_tcp_hdr_len; in lm_send_packet()
643 …total_hlen_bytes = packet->l2pkt_tx_info->lso_ip_hdr_len + packet->l2pkt_tx_info->lso_tcp_hdr_len … in lm_send_packet()
646 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_TCP_LSO_FRAME)) in lm_send_packet()
648 lm_pre_process_lso_packet(pdev, packet, frags, &split_required, total_hlen_bytes); in lm_send_packet()
653 if (lm_is_packet_coalescing_required(pdev, packet, frags, num_parsing_bds)) in lm_send_packet()
658 if (ERR_IF(packet->u1.tx.coalesce_buf != NULL)) in lm_send_packet()
666 pdev, tx_chain, packet, frags, &coalesce_buf); in lm_send_packet()
672 packet->u1.tx.coalesce_buf = coalesce_buf; /* saved to be freed upon completion */ in lm_send_packet()
674 packet->u1.tx.hdr_nbds = 1; in lm_send_packet()
691 if (packet->u1.tx.coalesce_buf) in lm_send_packet()
694 lm_put_coalesce_buffer(pdev, tx_chain, packet->u1.tx.coalesce_buf); in lm_send_packet()
695 packet->u1.tx.coalesce_buf = NULL; in lm_send_packet()
700 packet->size = 0; in lm_send_packet()
719 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_ENCAP_PACKET_IS_INNER_IPV6)) in lm_send_packet()
727 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_IPV6_PACKET)) in lm_send_packet()
733 if (GET_FLAGS(packet->l2pkt_tx_info->flags , LM_TX_FLAG_INSERT_VLAN_TAG)) in lm_send_packet()
735 DbgMessage(pdev, INFORMl2, "Outband vlan 0X%x\n",packet->l2pkt_tx_info->vlan_tag); in lm_send_packet()
738 vlan_tag = packet->l2pkt_tx_info->vlan_tag; in lm_send_packet()
740 else if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_VLAN_TAG_EXISTS)) in lm_send_packet()
742 DbgMessage(pdev, INFORMl2, "Inband vlan 0X%x\n",packet->l2pkt_tx_info->vlan_tag); in lm_send_packet()
745 vlan_tag = packet->l2pkt_tx_info->vlan_tag; in lm_send_packet()
750 ((u8_t*)&vlan_tag)[0] = packet->l2pkt_tx_info->eth_type[1]; //VF is in secure mode in lm_send_packet()
751 ((u8_t*)&vlan_tag)[1] = packet->l2pkt_tx_info->eth_type[0]; //VF is in secure mode in lm_send_packet()
753 ((u8_t*)&vlan_tag)[0] = packet->l2pkt_tx_info->eth_type[3]; //VF is in secure mode in lm_send_packet()
754 ((u8_t*)&vlan_tag)[1] = packet->l2pkt_tx_info->eth_type[2]; //VF is in secure mode in lm_send_packet()
765 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_FORCE_VLAN_MODE)) in lm_send_packet()
771 packet->size += frag->size; in lm_send_packet()
805 …fill_bds_for_encapsulated_packet(pdev, packet, &parse_bd_e2->data.tunnel_data, parse_bd_2nd_ptr, e… in lm_send_packet()
813 if GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_TCP_LSO_FRAME) in lm_send_packet()
816 lm_process_lso_packet(packet, pdev, tx_chain, frags, parse_bd_ptr, start_bd, in lm_send_packet()
852 packet->size += frag->size; in lm_send_packet()
860 total_pkt_bytes_bd->total_pkt_bytes = mm_cpu_to_le16((u16_t) packet->size); in lm_send_packet()
867 …if (GET_FLAGS(packet->l2pkt_tx_info->flags, (LM_TX_FLAG_COMPUTE_IP_CKSUM | LM_TX_FLAG_COMPUTE_TCP_… in lm_send_packet()
871 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_COMPUTE_IP_CKSUM) && in lm_send_packet()
872 (!GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_ENCAP_PACKET_IS_INNER_IPV6))) in lm_send_packet()
877 if (GET_FLAGS(packet->l2pkt_tx_info->flags, LM_TX_FLAG_COMPUTE_TCP_UDP_CKSUM)) in lm_send_packet()
880 if(packet->l2pkt_tx_info->cs_any_offset) in lm_send_packet()
894 parse_bd_e1x->ip_hlen_w = packet->l2pkt_tx_info->lso_ip_hdr_len >> 1; in lm_send_packet()
896 …parse_bd_e1x->total_hlen_w = mm_cpu_to_le16((packet->l2pkt_tx_info->lso_ip_hdr_len >> 1) + ( (eth_… in lm_send_packet()
898 if(packet->l2pkt_tx_info->flags & LM_TX_FLAG_TCP_LSO_SNAP_FRAME) { in lm_send_packet()
902 if (packet->l2pkt_tx_info->flags & LM_TX_FLAG_COMPUTE_TCP_UDP_CKSUM) in lm_send_packet()
904 … parse_bd_e1x->tcp_pseudo_csum = mm_cpu_to_le16(packet->l2pkt_tx_info->tcp_pseudo_csum); in lm_send_packet()
905 …parse_bd_e1x->global_data |= (packet->l2pkt_tx_info->tcp_nonce_sum_bit << ETH_TX_PARSE_BD_E1X_… in lm_send_packet()
916 val = (( packet->l2pkt_tx_info->encap_packet_inner_frame_offset + in lm_send_packet()
917 packet->l2pkt_tx_info->encap_packet_inner_ip_relative_offset + in lm_send_packet()
918 packet->l2pkt_tx_info->encap_packet_inner_tcp_relative_offset ) >> 1 ); in lm_send_packet()
921 if (packet->l2pkt_tx_info->encap_packet_inner_tcp_relative_offset > 40) { in lm_send_packet()
927 val = ((packet->l2pkt_tx_info->lso_ip_hdr_len + eth_hlen) >> 1); in lm_send_packet()
929 if (packet->l2pkt_tx_info->lso_ip_hdr_len > 40) { in lm_send_packet()
936 val = (packet->l2pkt_tx_info->lso_tcp_hdr_len >> 2); in lm_send_packet()
951 packet->l2pkt_tx_info->dst_mac_addr); in lm_send_packet()
955 packet->l2pkt_tx_info->src_mac_addr); in lm_send_packet()
963 if (IS_ETH_MULTICAST(packet->l2pkt_tx_info->dst_mac_addr)) in lm_send_packet()
965 if (IS_ETH_BROADCAST(packet->l2pkt_tx_info->dst_mac_addr)) in lm_send_packet()
990 packet->u1.tx.bd_used = start_bd_nbd += (u16_t)frags->cnt; in lm_send_packet()
992 packet->u1.tx.next_bd_idx = lm_bd_chain_prod_idx(&tx_chain->bd_chain); in lm_send_packet()
993 tx_chain->prod_bseq += packet->size; in lm_send_packet()
997 DbgBreakIfFastPath(packet->size < ETHERNET_PACKET_HEADER_SIZE); in lm_send_packet()
1036 s_list_push_tail(&tx_chain->active_descq, &packet->link); in lm_send_packet()