From: Haiyue Wang <haiyue.wang@intel.com> To: dev@dpdk.org, qiming.yang@intel.com, qi.z.zhang@intel.com Cc: ting.xu@intel.com, chenmin.sun@intel.com, yinan.wang@intel.com, Haiyue Wang <haiyue.wang@intel.com>, stable@dpdk.org Subject: [dpdk-dev] [PATCH v1] net/ice: revert the TSO fake fix Date: Fri, 31 Jul 2020 13:59:40 +0800 Message-ID: <20200731055940.261825-1-haiyue.wang@intel.com> (raw) The two fixes are not the real root cause for MDD event, it mitigates the failure rate when different test mode, so revert them. Fixes: 2a0c9ae4f646 ("net/ice: fix TCP checksum offload") Fixes: 7365a3cee51f ("net/ice: calculate TCP header size for offload") Cc: stable@dpdk.org Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> --- drivers/net/ice/ice_rxtx.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index b83c5c8629..2e1f06d2c0 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2234,7 +2234,7 @@ ice_txd_enable_checksum(uint64_t ol_flags, switch (ol_flags & PKT_TX_L4_MASK) { case PKT_TX_TCP_CKSUM: *td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP; - *td_offset |= (tx_offload.l4_len >> 2) << + *td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) << ICE_TX_DESC_LEN_L4_LEN_S; break; case PKT_TX_SCTP_CKSUM: @@ -2371,28 +2371,6 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt) return count; } -/* Calculate TCP header length for PKT_TX_TCP_CKSUM if not provided */ -static inline uint16_t -ice_calc_pkt_tcp_hdr(struct rte_mbuf *tx_pkt, union ice_tx_offload tx_offload) -{ - uint16_t tcpoff = tx_offload.l2_len + tx_offload.l3_len; - const struct rte_tcp_hdr *tcp_hdr; - struct rte_tcp_hdr _tcp_hdr; - - if (tcpoff + sizeof(struct rte_tcp_hdr) < tx_pkt->data_len) { - tcp_hdr = rte_pktmbuf_mtod_offset(tx_pkt, struct rte_tcp_hdr *, - tcpoff); - - return (tcp_hdr->data_off & 0xf0) >> 2; - } - - tcp_hdr = rte_pktmbuf_read(tx_pkt, tcpoff, sizeof(_tcp_hdr), &_tcp_hdr); - if (tcp_hdr) - return (tcp_hdr->data_off & 0xf0) >> 2; - else - return 0; -} - uint16_t ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) { @@ -2491,15 +2469,9 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) &cd_tunneling_params); /* Enable checksum offloading */ - if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK) { - if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM && - !tx_offload.l4_len) - tx_offload.l4_len = - ice_calc_pkt_tcp_hdr(tx_pkt, tx_offload); - + if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK) ice_txd_enable_checksum(ol_flags, &td_cmd, &td_offset, tx_offload); - } if (nb_ctx) { /* Setup TX context descriptor if required */ -- 2.28.0
next reply other threads:[~2020-07-31 6:09 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-31 5:59 Haiyue Wang [this message] 2020-07-31 7:52 ` Zhang, Qi Z
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200731055940.261825-1-haiyue.wang@intel.com \ --to=haiyue.wang@intel.com \ --cc=chenmin.sun@intel.com \ --cc=dev@dpdk.org \ --cc=qi.z.zhang@intel.com \ --cc=qiming.yang@intel.com \ --cc=stable@dpdk.org \ --cc=ting.xu@intel.com \ --cc=yinan.wang@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git