Hi, Harold, I am curious how this bug is found as I have an unsolved bug that I believe it's related to some memory issues and may be related to NIC's problem.
Harold Huang <[email protected]> 于2022年1月13日周四 16:24写道: > From: Harold Huang <[email protected]> > > When one flow is output to multiple egress ports, OVS copy the packets > and send the copy packets to the intermediate ports. The original packets > is sent to the last port. If the intermediate port is a dpdk port, the copy > packets should also be prepared for tso offload. > > Fixes: 29cf9c1b3b ("userspace: Add TCP Segmentation Offload support") > Signed-off-by: Harold Huang <[email protected]> > --- > lib/netdev-dpdk.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index 6782d3e8f..83029405e 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -2737,10 +2737,11 @@ dpdk_pktmbuf_alloc(struct rte_mempool *mp, > uint32_t data_len) > } > > static struct dp_packet * > -dpdk_copy_dp_packet_to_mbuf(struct rte_mempool *mp, struct dp_packet > *pkt_orig) > +dpdk_copy_dp_packet_to_mbuf(struct netdev_dpdk *dev, struct dp_packet > *pkt_orig) > { > struct rte_mbuf *mbuf_dest; > struct dp_packet *pkt_dest; > + struct rte_mempool *mp = dev->dpdk_mp->mp; > uint32_t pkt_len; > > pkt_len = dp_packet_size(pkt_orig); > @@ -2761,11 +2762,9 @@ dpdk_copy_dp_packet_to_mbuf(struct rte_mempool *mp, > struct dp_packet *pkt_orig) > memcpy(&pkt_dest->l2_pad_size, &pkt_orig->l2_pad_size, > sizeof(struct dp_packet) - offsetof(struct dp_packet, > l2_pad_size)); > > - if (mbuf_dest->ol_flags & RTE_MBUF_F_TX_L4_MASK) { > - mbuf_dest->l2_len = (char *)dp_packet_l3(pkt_dest) > - - (char *)dp_packet_eth(pkt_dest); > - mbuf_dest->l3_len = (char *)dp_packet_l4(pkt_dest) > - - (char *) dp_packet_l3(pkt_dest); > + if (!netdev_dpdk_prep_hwol_packet(dev, mbuf_dest)) { > perhaps check userspace_tso_enabled()? > + rte_pktmbuf_free(mbuf_dest); > + return NULL; > } > > return pkt_dest; > @@ -2813,7 +2812,7 @@ dpdk_do_tx_copy(struct netdev *netdev, int qid, > struct dp_packet_batch *batch) > continue; > } > > - pkts[txcnt] = dpdk_copy_dp_packet_to_mbuf(dev->dpdk_mp->mp, > packet); > + pkts[txcnt] = dpdk_copy_dp_packet_to_mbuf(dev, packet); > if (OVS_UNLIKELY(!pkts[txcnt])) { > dropped = cnt - i; > break; > -- > 2.27.0 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > -- hepeng _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
