"port_conf" is a global const variables, and in function dpdk_eth_dev_queue_setup it is asigned to the local variables "conf". The jumbo_frame bit is set in the local varables, previous configuration shouldn't influence on the other port.
Thanks "Kavanagh, Mark B" <mark.b.kavan...@intel.com> 写于 2016/10/11 21:46:00: > 发件人: "Kavanagh, Mark B" <mark.b.kavan...@intel.com> > 收件人: Binbin Xu <xu.binb...@zte.com.cn>, "dev@openvswitch.org" > <dev@openvswitch.org>, > 日期: 2016/10/11 21:46 > 主题: RE: [ovs-dev] [PATCH] netdev-dpdk: Optimise the > initialization of "port_conf" > > > > >The member "max_rx_pkt_len" of "port_conf" is only used if > >jumbo_frame enabled, so it can be initialized with value '0'. > > > >Signed-off-by: Binbin Xu <xu.binb...@zte.com.cn> > >--- > > lib/netdev-dpdk.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > >diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > >index 39bf930..c4a0cc0 100644 > >--- a/lib/netdev-dpdk.c > >+++ b/lib/netdev-dpdk.c > >@@ -154,6 +154,7 @@ static char *vhost_sock_dir = NULL; /* > Location of vhost-user sockets > >*/ > > static const struct rte_eth_conf port_conf = { > > .rxmode = { > > .mq_mode = ETH_MQ_RX_RSS, > >+ .max_rx_pkt_len = 0, > > .split_hdr_size = 0, > > .header_split = 0, /* Header Split disabled */ > > .hw_ip_checksum = 0, /* IP checksum offload disabled */ > >@@ -648,9 +649,6 @@ dpdk_eth_dev_queue_setup(struct netdev_dpdk > *dev, int n_rxq, int n_txq) > > if (dev->mtu > ETHER_MTU) { > > conf.rxmode.jumbo_frame = 1; > > conf.rxmode.max_rx_pkt_len = dev->max_packet_len; > >- } else { > >- conf.rxmode.jumbo_frame = 0; > >- conf.rxmode.max_rx_pkt_len = 0; > > } > > NACK: if a previous configuration already set the jumbo_frame bit, a > subsequent non-jumbo port could inherit this attribute - that's why > it's reset explicitly here. > > > /* A device may report more queues than it makes available (this has > > * been observed for Intel xl710, which reserves some of them for > >-- > >2.9.3 > > > >_______________________________________________ > >dev mailing list > >dev@openvswitch.org > >http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev