X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fenic%2Fenic_res.c;h=f7cbc90fb6a16a3c91540e9645c7068c193e5ef6;hb=6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1;hp=d1113b2f15ba3ec05527eb4772afaf1f144fab33;hpb=5bc989e6db9df8acbf8129a4ea4a78d8614944f7;p=dpdk.git diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c index d1113b2f15..f7cbc90fb6 100644 --- a/drivers/net/enic/enic_res.c +++ b/drivers/net/enic/enic_res.c @@ -61,10 +61,9 @@ int enic_get_vnic_config(struct enic *enic) * and will be 0 for legacy firmware and VICs */ if (c->max_pkt_size > ENIC_DEFAULT_RX_MAX_PKT_SIZE) - enic->max_mtu = c->max_pkt_size - (ETHER_HDR_LEN + 4); + enic->max_mtu = c->max_pkt_size - ETHER_HDR_LEN; else - enic->max_mtu = ENIC_DEFAULT_RX_MAX_PKT_SIZE - - (ETHER_HDR_LEN + 4); + enic->max_mtu = ENIC_DEFAULT_RX_MAX_PKT_SIZE - ETHER_HDR_LEN; if (c->mtu == 0) c->mtu = 1500; @@ -85,7 +84,7 @@ int enic_get_vnic_config(struct enic *enic) vnic_dev_capable_udp_rss_weak(enic->vdev, &enic->nic_cfg_chk, &enic->udp_rss_weak); - dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s\n", + dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s%s\n", ((enic->flow_filter_mode == FILTER_DPDK_1) ? "DPDK" : ((enic->flow_filter_mode == FILTER_USNIC_IP) ? "USNIC" : ((enic->flow_filter_mode == FILTER_IPV4_5TUPLE) ? "5TUPLE" : @@ -95,7 +94,9 @@ int enic_get_vnic_config(struct enic *enic) ((enic->filter_actions & FILTER_ACTION_FILTER_ID_FLAG) ? "tag " : ""), ((enic->filter_actions & FILTER_ACTION_DROP_FLAG) ? - "drop " : "")); + "drop " : ""), + ((enic->filter_actions & FILTER_ACTION_COUNTER_FLAG) ? + "count " : "")); c->wq_desc_count = min_t(u32, ENIC_MAX_WQ_DESCS, @@ -183,7 +184,9 @@ int enic_get_vnic_config(struct enic *enic) * Default hardware capabilities. enic_dev_init() may add additional * flags if it enables overlay offloads. */ + enic->tx_queue_offload_capa = 0; enic->tx_offload_capa = + enic->tx_queue_offload_capa | DEV_TX_OFFLOAD_MULTI_SEGS | DEV_TX_OFFLOAD_VLAN_INSERT | DEV_TX_OFFLOAD_IPV4_CKSUM | @@ -193,13 +196,14 @@ int enic_get_vnic_config(struct enic *enic) enic->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER | DEV_RX_OFFLOAD_JUMBO_FRAME | - DEV_RX_OFFLOAD_CRC_STRIP | DEV_RX_OFFLOAD_VLAN_STRIP | DEV_RX_OFFLOAD_IPV4_CKSUM | DEV_RX_OFFLOAD_UDP_CKSUM | DEV_RX_OFFLOAD_TCP_CKSUM; enic->tx_offload_mask = - PKT_TX_VLAN_PKT | + PKT_TX_IPV6 | + PKT_TX_IPV4 | + PKT_TX_VLAN | PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG; @@ -207,32 +211,6 @@ int enic_get_vnic_config(struct enic *enic) return 0; } -int enic_add_vlan(struct enic *enic, u16 vlanid) -{ - u64 a0 = vlanid, a1 = 0; - int wait = 1000; - int err; - - err = vnic_dev_cmd(enic->vdev, CMD_VLAN_ADD, &a0, &a1, wait); - if (err) - dev_err(enic_get_dev(enic), "Can't add vlan id, %d\n", err); - - return err; -} - -int enic_del_vlan(struct enic *enic, u16 vlanid) -{ - u64 a0 = vlanid, a1 = 0; - int wait = 1000; - int err; - - err = vnic_dev_cmd(enic->vdev, CMD_VLAN_DEL, &a0, &a1, wait); - if (err) - dev_err(enic_get_dev(enic), "Can't delete vlan id, %d\n", err); - - return err; -} - int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type, u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en, u8 ig_vlan_strip_en)