* [dpdk-dev] [PATCH] net/ring: advertise multi segment support. @ 2020-09-18 10:36 Dumitru Ceara 2020-09-22 14:21 ` Ferruh Yigit 2020-09-28 18:47 ` [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX Dumitru Ceara 0 siblings, 2 replies; 15+ messages in thread From: Dumitru Ceara @ 2020-09-18 10:36 UTC (permalink / raw) To: dev; +Cc: bruce.richardson Even though ring interfaces don't support any other TX/RX offloads they do support sending multi segment packets and this should be advertised in order to not break applications that use ring interfaces. Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- drivers/net/ring/rte_eth_ring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 733c898..59d1e67 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -160,6 +160,7 @@ struct pmd_internals { dev_info->max_mac_addrs = 1; dev_info->max_rx_pktlen = (uint32_t)-1; dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues; + dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS; dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues; dev_info->min_rx_bufsize = 0; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-18 10:36 [dpdk-dev] [PATCH] net/ring: advertise multi segment support Dumitru Ceara @ 2020-09-22 14:21 ` Ferruh Yigit 2020-09-28 7:31 ` Dumitru Ceara 2020-09-28 18:47 ` [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX Dumitru Ceara 1 sibling, 1 reply; 15+ messages in thread From: Ferruh Yigit @ 2020-09-22 14:21 UTC (permalink / raw) To: Dumitru Ceara, dev; +Cc: bruce.richardson On 9/18/2020 11:36 AM, Dumitru Ceara wrote: > Even though ring interfaces don't support any other TX/RX offloads they > do support sending multi segment packets and this should be advertised > in order to not break applications that use ring interfaces. > Does ring PMD support sending multi segmented packets? As far as I can see ring PMD doesn't know about the mbuf segments. > > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > --- > drivers/net/ring/rte_eth_ring.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c > index 733c898..59d1e67 100644 > --- a/drivers/net/ring/rte_eth_ring.c > +++ b/drivers/net/ring/rte_eth_ring.c > @@ -160,6 +160,7 @@ struct pmd_internals { > dev_info->max_mac_addrs = 1; > dev_info->max_rx_pktlen = (uint32_t)-1; > dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues; > + dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS; > dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues; > dev_info->min_rx_bufsize = 0; > > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-22 14:21 ` Ferruh Yigit @ 2020-09-28 7:31 ` Dumitru Ceara 2020-09-28 10:25 ` Ferruh Yigit 0 siblings, 1 reply; 15+ messages in thread From: Dumitru Ceara @ 2020-09-28 7:31 UTC (permalink / raw) To: Ferruh Yigit, dev; +Cc: bruce.richardson On 9/22/20 4:21 PM, Ferruh Yigit wrote: > On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >> Even though ring interfaces don't support any other TX/RX offloads they >> do support sending multi segment packets and this should be advertised >> in order to not break applications that use ring interfaces. >> > > Does ring PMD support sending multi segmented packets? > Yes, sending multi segmented packets works fine with ring PMD. > As far as I can see ring PMD doesn't know about the mbuf segments. > Right, the PMD doesn't care about the mbuf segments but it implicitly supports sending multi segmented packets. From what I see it's actually the case for most of the PMDs, in the sense that most don't even check the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi segment packets they are just accepted. However, the fact that the ring PMD doesn't advertise this implicit support forces applications that use ring PMD to have a special case for handling ring interfaces. If the ring PMD would advertise DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious to the type of underlying interface. Thanks, Dumitru ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 7:31 ` Dumitru Ceara @ 2020-09-28 10:25 ` Ferruh Yigit 2020-09-28 11:00 ` Ananyev, Konstantin 2020-09-28 11:01 ` Bruce Richardson 0 siblings, 2 replies; 15+ messages in thread From: Ferruh Yigit @ 2020-09-28 10:25 UTC (permalink / raw) To: Dumitru Ceara, dev; +Cc: bruce.richardson On 9/28/2020 8:31 AM, Dumitru Ceara wrote: > On 9/22/20 4:21 PM, Ferruh Yigit wrote: >> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>> Even though ring interfaces don't support any other TX/RX offloads they >>> do support sending multi segment packets and this should be advertised >>> in order to not break applications that use ring interfaces. >>> >> >> Does ring PMD support sending multi segmented packets? >> > > Yes, sending multi segmented packets works fine with ring PMD. > Define "works fine" :) All PMDs can put the first mbuf of the chained mbuf to the ring, in that case what is the difference between the ones supports 'DEV_TX_OFFLOAD_MULTI_SEGS' and the ones doesn't support? If the traffic is only from ring PMD to ring PMD, you won't recognize the difference between segmented or not-segmented mbufs, and it will look like segmented packets works fine. But if there is other PMDs involved in the forwarding, or if need to process the packets, will it still work fine? >> As far as I can see ring PMD doesn't know about the mbuf segments. >> > > Right, the PMD doesn't care about the mbuf segments but it implicitly > supports sending multi segmented packets. From what I see it's actually > the case for most of the PMDs, in the sense that most don't even check > the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi > segment packets they are just accepted. > As far as I can see, if the segmented packets sent, the ring PMD will put the first mbuf into the ring without doing anything specific to the next segments. If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect the segmented packets and put each chained mbuf into the separate field in the ring. > > However, the fact that the ring PMD doesn't advertise this implicit > support forces applications that use ring PMD to have a special case for > handling ring interfaces. If the ring PMD would advertise > DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious > to the type of underlying interface. > This is not handling the special case for the ring PMD, this is why he have the offload capability flag. Application should behave according capability flags, not per specific PMD. Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 10:25 ` Ferruh Yigit @ 2020-09-28 11:00 ` Ananyev, Konstantin 2020-09-28 12:42 ` Ferruh Yigit 2020-09-28 11:01 ` Bruce Richardson 1 sibling, 1 reply; 15+ messages in thread From: Ananyev, Konstantin @ 2020-09-28 11:00 UTC (permalink / raw) To: Yigit, Ferruh, Dumitru Ceara, dev; +Cc: Richardson, Bruce > On 9/28/2020 8:31 AM, Dumitru Ceara wrote: > > On 9/22/20 4:21 PM, Ferruh Yigit wrote: > >> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: > >>> Even though ring interfaces don't support any other TX/RX offloads they > >>> do support sending multi segment packets and this should be advertised > >>> in order to not break applications that use ring interfaces. > >>> > >> > >> Does ring PMD support sending multi segmented packets? > >> > > > > Yes, sending multi segmented packets works fine with ring PMD. > > > > Define "works fine" :) > > All PMDs can put the first mbuf of the chained mbuf to the ring, in that case > what is the difference between the ones supports 'DEV_TX_OFFLOAD_MULTI_SEGS' and > the ones doesn't support? > > If the traffic is only from ring PMD to ring PMD, you won't recognize the > difference between segmented or not-segmented mbufs, and it will look like > segmented packets works fine. > But if there is other PMDs involved in the forwarding, or if need to process the > packets, will it still work fine? > > >> As far as I can see ring PMD doesn't know about the mbuf segments. > >> > > > > Right, the PMD doesn't care about the mbuf segments but it implicitly > > supports sending multi segmented packets. From what I see it's actually > > the case for most of the PMDs, in the sense that most don't even check > > the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi > > segment packets they are just accepted. > > > > As far as I can see, if the segmented packets sent, the ring PMD will put the > first mbuf into the ring without doing anything specific to the next segments. > > If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect the > segmented packets and put each chained mbuf into the separate field in the ring. Hmm, wonder why do you think this is necessary? From my perspective current behaviour is sufficient for TX-ing multi-seg packets over the ring. > > > > > However, the fact that the ring PMD doesn't advertise this implicit > > support forces applications that use ring PMD to have a special case for > > handling ring interfaces. If the ring PMD would advertise > > DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious > > to the type of underlying interface. > > > > This is not handling the special case for the ring PMD, this is why he have the > offload capability flag. Application should behave according capability flags, > not per specific PMD. > > Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 11:00 ` Ananyev, Konstantin @ 2020-09-28 12:42 ` Ferruh Yigit 2020-09-28 13:10 ` Ananyev, Konstantin 0 siblings, 1 reply; 15+ messages in thread From: Ferruh Yigit @ 2020-09-28 12:42 UTC (permalink / raw) To: Ananyev, Konstantin, Dumitru Ceara, dev; +Cc: Richardson, Bruce On 9/28/2020 12:00 PM, Ananyev, Konstantin wrote: >> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: >>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: >>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>>>> Even though ring interfaces don't support any other TX/RX offloads they >>>>> do support sending multi segment packets and this should be advertised >>>>> in order to not break applications that use ring interfaces. >>>>> >>>> >>>> Does ring PMD support sending multi segmented packets? >>>> >>> >>> Yes, sending multi segmented packets works fine with ring PMD. >>> >> >> Define "works fine" :) >> >> All PMDs can put the first mbuf of the chained mbuf to the ring, in that case >> what is the difference between the ones supports 'DEV_TX_OFFLOAD_MULTI_SEGS' and >> the ones doesn't support? >> >> If the traffic is only from ring PMD to ring PMD, you won't recognize the >> difference between segmented or not-segmented mbufs, and it will look like >> segmented packets works fine. >> But if there is other PMDs involved in the forwarding, or if need to process the >> packets, will it still work fine? >> >>>> As far as I can see ring PMD doesn't know about the mbuf segments. >>>> >>> >>> Right, the PMD doesn't care about the mbuf segments but it implicitly >>> supports sending multi segmented packets. From what I see it's actually >>> the case for most of the PMDs, in the sense that most don't even check >>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi >>> segment packets they are just accepted. >> > >> >> As far as I can see, if the segmented packets sent, the ring PMD will put the >> first mbuf into the ring without doing anything specific to the next segments. >> >> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect the >> segmented packets and put each chained mbuf into the separate field in the ring. > > Hmm, wonder why do you think this is necessary? > From my perspective current behaviour is sufficient for TX-ing multi-seg packets > over the ring. > I was thinking based on what some PMDs already doing, but right ring may not need to do it. Also for the case, one application is sending multi segmented packets to the ring, and other application pulling packets from the ring and sending to a PMD that does NOT support the multi-seg TX. I thought ring PMD claiming the multi-seg Tx support should serialize packets to support this case, but instead ring claiming 'DEV_RX_OFFLOAD_SCATTER' capability can work by pushing the responsibility to the application. So in this case ring should support both 'DEV_TX_OFFLOAD_MULTI_SEGS' & 'DEV_RX_OFFLOAD_SCATTER', what do you think? >> >>> >>> However, the fact that the ring PMD doesn't advertise this implicit >>> support forces applications that use ring PMD to have a special case for >>> handling ring interfaces. If the ring PMD would advertise >>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious >>> to the type of underlying interface. >>> >> >> This is not handling the special case for the ring PMD, this is why he have the >> offload capability flag. Application should behave according capability flags, >> not per specific PMD. >> >> Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 12:42 ` Ferruh Yigit @ 2020-09-28 13:10 ` Ananyev, Konstantin 2020-09-28 13:26 ` Ferruh Yigit 0 siblings, 1 reply; 15+ messages in thread From: Ananyev, Konstantin @ 2020-09-28 13:10 UTC (permalink / raw) To: Yigit, Ferruh, Dumitru Ceara, dev; +Cc: Richardson, Bruce > -----Original Message----- > From: Ferruh Yigit <ferruh.yigit@intel.com> > Sent: Monday, September 28, 2020 1:43 PM > To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Dumitru Ceara <dceara@redhat.com>; dev@dpdk.org > Cc: Richardson, Bruce <bruce.richardson@intel.com> > Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. > > On 9/28/2020 12:00 PM, Ananyev, Konstantin wrote: > >> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: > >>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: > >>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: > >>>>> Even though ring interfaces don't support any other TX/RX offloads they > >>>>> do support sending multi segment packets and this should be advertised > >>>>> in order to not break applications that use ring interfaces. > >>>>> > >>>> > >>>> Does ring PMD support sending multi segmented packets? > >>>> > >>> > >>> Yes, sending multi segmented packets works fine with ring PMD. > >>> > >> > >> Define "works fine" :) > >> > >> All PMDs can put the first mbuf of the chained mbuf to the ring, in that case > >> what is the difference between the ones supports 'DEV_TX_OFFLOAD_MULTI_SEGS' and > >> the ones doesn't support? > >> > >> If the traffic is only from ring PMD to ring PMD, you won't recognize the > >> difference between segmented or not-segmented mbufs, and it will look like > >> segmented packets works fine. > >> But if there is other PMDs involved in the forwarding, or if need to process the > >> packets, will it still work fine? > >> > >>>> As far as I can see ring PMD doesn't know about the mbuf segments. > >>>> > >>> > >>> Right, the PMD doesn't care about the mbuf segments but it implicitly > >>> supports sending multi segmented packets. From what I see it's actually > >>> the case for most of the PMDs, in the sense that most don't even check > >>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi > >>> segment packets they are just accepted. > >> > > >> > >> As far as I can see, if the segmented packets sent, the ring PMD will put the > >> first mbuf into the ring without doing anything specific to the next segments. > >> > >> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect the > >> segmented packets and put each chained mbuf into the separate field in the ring. > > > > Hmm, wonder why do you think this is necessary? > > From my perspective current behaviour is sufficient for TX-ing multi-seg packets > > over the ring. > > > > I was thinking based on what some PMDs already doing, but right ring may not > need to do it. > > Also for the case, one application is sending multi segmented packets to the > ring, and other application pulling packets from the ring and sending to a PMD > that does NOT support the multi-seg TX. I thought ring PMD claiming the > multi-seg Tx support should serialize packets to support this case, but instead > ring claiming 'DEV_RX_OFFLOAD_SCATTER' capability can work by pushing the > responsibility to the application. > > So in this case ring should support both 'DEV_TX_OFFLOAD_MULTI_SEGS' & > 'DEV_RX_OFFLOAD_SCATTER', what do you think? Seems so... Another question - should we allow DEV_TX_OFFLOAD_MULTI_SEGS here, if DEV_RX_OFFLOAD_SCATTER was not specified? > > >> > >>> > >>> However, the fact that the ring PMD doesn't advertise this implicit > >>> support forces applications that use ring PMD to have a special case for > >>> handling ring interfaces. If the ring PMD would advertise > >>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious > >>> to the type of underlying interface. > >>> > >> > >> This is not handling the special case for the ring PMD, this is why he have the > >> offload capability flag. Application should behave according capability flags, > >> not per specific PMD. > >> > >> Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 13:10 ` Ananyev, Konstantin @ 2020-09-28 13:26 ` Ferruh Yigit 2020-09-28 13:58 ` Dumitru Ceara 0 siblings, 1 reply; 15+ messages in thread From: Ferruh Yigit @ 2020-09-28 13:26 UTC (permalink / raw) To: Ananyev, Konstantin, Dumitru Ceara, dev; +Cc: Richardson, Bruce On 9/28/2020 2:10 PM, Ananyev, Konstantin wrote: > > >> -----Original Message----- >> From: Ferruh Yigit <ferruh.yigit@intel.com> >> Sent: Monday, September 28, 2020 1:43 PM >> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Dumitru Ceara <dceara@redhat.com>; dev@dpdk.org >> Cc: Richardson, Bruce <bruce.richardson@intel.com> >> Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. >> >> On 9/28/2020 12:00 PM, Ananyev, Konstantin wrote: >>>> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: >>>>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: >>>>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>>>>>> Even though ring interfaces don't support any other TX/RX offloads they >>>>>>> do support sending multi segment packets and this should be advertised >>>>>>> in order to not break applications that use ring interfaces. >>>>>>> >>>>>> >>>>>> Does ring PMD support sending multi segmented packets? >>>>>> >>>>> >>>>> Yes, sending multi segmented packets works fine with ring PMD. >>>>> >>>> >>>> Define "works fine" :) >>>> >>>> All PMDs can put the first mbuf of the chained mbuf to the ring, in that case >>>> what is the difference between the ones supports 'DEV_TX_OFFLOAD_MULTI_SEGS' and >>>> the ones doesn't support? >>>> >>>> If the traffic is only from ring PMD to ring PMD, you won't recognize the >>>> difference between segmented or not-segmented mbufs, and it will look like >>>> segmented packets works fine. >>>> But if there is other PMDs involved in the forwarding, or if need to process the >>>> packets, will it still work fine? >>>> >>>>>> As far as I can see ring PMD doesn't know about the mbuf segments. >>>>>> >>>>> >>>>> Right, the PMD doesn't care about the mbuf segments but it implicitly >>>>> supports sending multi segmented packets. From what I see it's actually >>>>> the case for most of the PMDs, in the sense that most don't even check >>>>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi >>>>> segment packets they are just accepted. >>>> > >>>> >>>> As far as I can see, if the segmented packets sent, the ring PMD will put the >>>> first mbuf into the ring without doing anything specific to the next segments. >>>> >>>> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect the >>>> segmented packets and put each chained mbuf into the separate field in the ring. >>> >>> Hmm, wonder why do you think this is necessary? >>> From my perspective current behaviour is sufficient for TX-ing multi-seg packets >>> over the ring. >>> >> >> I was thinking based on what some PMDs already doing, but right ring may not >> need to do it. >> >> Also for the case, one application is sending multi segmented packets to the >> ring, and other application pulling packets from the ring and sending to a PMD >> that does NOT support the multi-seg TX. I thought ring PMD claiming the >> multi-seg Tx support should serialize packets to support this case, but instead >> ring claiming 'DEV_RX_OFFLOAD_SCATTER' capability can work by pushing the >> responsibility to the application. >> >> So in this case ring should support both 'DEV_TX_OFFLOAD_MULTI_SEGS' & >> 'DEV_RX_OFFLOAD_SCATTER', what do you think? > > Seems so... > Another question - should we allow DEV_TX_OFFLOAD_MULTI_SEGS here, > if DEV_RX_OFFLOAD_SCATTER was not specified? > I think better to have a new version of the patch to claim both capabilities together. > >> >>>> >>>>> >>>>> However, the fact that the ring PMD doesn't advertise this implicit >>>>> support forces applications that use ring PMD to have a special case for >>>>> handling ring interfaces. If the ring PMD would advertise >>>>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious >>>>> to the type of underlying interface. >>>>> >>>> >>>> This is not handling the special case for the ring PMD, this is why he have the >>>> offload capability flag. Application should behave according capability flags, >>>> not per specific PMD. >>>> >>>> Is there any specific usecase you are trying to cover? > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 13:26 ` Ferruh Yigit @ 2020-09-28 13:58 ` Dumitru Ceara 2020-09-28 15:02 ` Ferruh Yigit 0 siblings, 1 reply; 15+ messages in thread From: Dumitru Ceara @ 2020-09-28 13:58 UTC (permalink / raw) To: Ferruh Yigit, Ananyev, Konstantin, dev; +Cc: Richardson, Bruce On 9/28/20 3:26 PM, Ferruh Yigit wrote: > On 9/28/2020 2:10 PM, Ananyev, Konstantin wrote: >> >> >>> -----Original Message----- >>> From: Ferruh Yigit <ferruh.yigit@intel.com> >>> Sent: Monday, September 28, 2020 1:43 PM >>> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Dumitru Ceara >>> <dceara@redhat.com>; dev@dpdk.org >>> Cc: Richardson, Bruce <bruce.richardson@intel.com> >>> Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment >>> support. >>> >>> On 9/28/2020 12:00 PM, Ananyev, Konstantin wrote: >>>>> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: >>>>>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: >>>>>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>>>>>>> Even though ring interfaces don't support any other TX/RX >>>>>>>> offloads they >>>>>>>> do support sending multi segment packets and this should be >>>>>>>> advertised >>>>>>>> in order to not break applications that use ring interfaces. >>>>>>>> >>>>>>> >>>>>>> Does ring PMD support sending multi segmented packets? >>>>>>> >>>>>> >>>>>> Yes, sending multi segmented packets works fine with ring PMD. >>>>>> >>>>> >>>>> Define "works fine" :) >>>>> >>>>> All PMDs can put the first mbuf of the chained mbuf to the ring, in >>>>> that case >>>>> what is the difference between the ones supports >>>>> 'DEV_TX_OFFLOAD_MULTI_SEGS' and >>>>> the ones doesn't support? >>>>> >>>>> If the traffic is only from ring PMD to ring PMD, you won't >>>>> recognize the >>>>> difference between segmented or not-segmented mbufs, and it will >>>>> look like >>>>> segmented packets works fine. >>>>> But if there is other PMDs involved in the forwarding, or if need >>>>> to process the >>>>> packets, will it still work fine? >>>>> >>>>>>> As far as I can see ring PMD doesn't know about the mbuf segments. >>>>>>> >>>>>> >>>>>> Right, the PMD doesn't care about the mbuf segments but it implicitly >>>>>> supports sending multi segmented packets. From what I see it's >>>>>> actually >>>>>> the case for most of the PMDs, in the sense that most don't even >>>>>> check >>>>>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi >>>>>> segment packets they are just accepted. >>>>> > >>>>> >>>>> As far as I can see, if the segmented packets sent, the ring PMD >>>>> will put the >>>>> first mbuf into the ring without doing anything specific to the >>>>> next segments. >>>>> >>>>> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should >>>>> detect the >>>>> segmented packets and put each chained mbuf into the separate field >>>>> in the ring. >>>> >>>> Hmm, wonder why do you think this is necessary? >>>> From my perspective current behaviour is sufficient for TX-ing >>>> multi-seg packets >>>> over the ring. >>>> >>> >>> I was thinking based on what some PMDs already doing, but right ring >>> may not >>> need to do it. >>> >>> Also for the case, one application is sending multi segmented packets >>> to the >>> ring, and other application pulling packets from the ring and sending >>> to a PMD >>> that does NOT support the multi-seg TX. I thought ring PMD claiming the >>> multi-seg Tx support should serialize packets to support this case, >>> but instead >>> ring claiming 'DEV_RX_OFFLOAD_SCATTER' capability can work by pushing >>> the >>> responsibility to the application. >>> >>> So in this case ring should support both 'DEV_TX_OFFLOAD_MULTI_SEGS' & >>> 'DEV_RX_OFFLOAD_SCATTER', what do you think? >> >> Seems so... >> Another question - should we allow DEV_TX_OFFLOAD_MULTI_SEGS here, >> if DEV_RX_OFFLOAD_SCATTER was not specified? >> > > I think better to have a new version of the patch to claim both > capabilities together. > OK, I can do that and send a v2 to claim both caps together. Just so that it's clear to me though, these capabilities will only be advertised and the current behavior of the ring PMD at tx/rx will remain unchanged, right? Thanks, Dumitru >> >>> >>>>> >>>>>> >>>>>> However, the fact that the ring PMD doesn't advertise this implicit >>>>>> support forces applications that use ring PMD to have a special >>>>>> case for >>>>>> handling ring interfaces. If the ring PMD would advertise >>>>>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be >>>>>> oblivious >>>>>> to the type of underlying interface. >>>>>> >>>>> >>>>> This is not handling the special case for the ring PMD, this is why >>>>> he have the >>>>> offload capability flag. Application should behave according >>>>> capability flags, >>>>> not per specific PMD. >>>>> >>>>> Is there any specific usecase you are trying to cover? >> > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 13:58 ` Dumitru Ceara @ 2020-09-28 15:02 ` Ferruh Yigit 0 siblings, 0 replies; 15+ messages in thread From: Ferruh Yigit @ 2020-09-28 15:02 UTC (permalink / raw) To: Dumitru Ceara, Ananyev, Konstantin, dev; +Cc: Richardson, Bruce On 9/28/2020 2:58 PM, Dumitru Ceara wrote: > On 9/28/20 3:26 PM, Ferruh Yigit wrote: >> On 9/28/2020 2:10 PM, Ananyev, Konstantin wrote: >>> >>> >>>> -----Original Message----- >>>> From: Ferruh Yigit <ferruh.yigit@intel.com> >>>> Sent: Monday, September 28, 2020 1:43 PM >>>> To: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Dumitru Ceara >>>> <dceara@redhat.com>; dev@dpdk.org >>>> Cc: Richardson, Bruce <bruce.richardson@intel.com> >>>> Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment >>>> support. >>>> >>>> On 9/28/2020 12:00 PM, Ananyev, Konstantin wrote: >>>>>> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: >>>>>>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: >>>>>>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>>>>>>>> Even though ring interfaces don't support any other TX/RX >>>>>>>>> offloads they >>>>>>>>> do support sending multi segment packets and this should be >>>>>>>>> advertised >>>>>>>>> in order to not break applications that use ring interfaces. >>>>>>>>> >>>>>>>> >>>>>>>> Does ring PMD support sending multi segmented packets? >>>>>>>> >>>>>>> >>>>>>> Yes, sending multi segmented packets works fine with ring PMD. >>>>>>> >>>>>> >>>>>> Define "works fine" :) >>>>>> >>>>>> All PMDs can put the first mbuf of the chained mbuf to the ring, in >>>>>> that case >>>>>> what is the difference between the ones supports >>>>>> 'DEV_TX_OFFLOAD_MULTI_SEGS' and >>>>>> the ones doesn't support? >>>>>> >>>>>> If the traffic is only from ring PMD to ring PMD, you won't >>>>>> recognize the >>>>>> difference between segmented or not-segmented mbufs, and it will >>>>>> look like >>>>>> segmented packets works fine. >>>>>> But if there is other PMDs involved in the forwarding, or if need >>>>>> to process the >>>>>> packets, will it still work fine? >>>>>> >>>>>>>> As far as I can see ring PMD doesn't know about the mbuf segments. >>>>>>>> >>>>>>> >>>>>>> Right, the PMD doesn't care about the mbuf segments but it implicitly >>>>>>> supports sending multi segmented packets. From what I see it's >>>>>>> actually >>>>>>> the case for most of the PMDs, in the sense that most don't even >>>>>>> check >>>>>>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi >>>>>>> segment packets they are just accepted. >>>>>> > >>>>>> >>>>>> As far as I can see, if the segmented packets sent, the ring PMD >>>>>> will put the >>>>>> first mbuf into the ring without doing anything specific to the >>>>>> next segments. >>>>>> >>>>>> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should >>>>>> detect the >>>>>> segmented packets and put each chained mbuf into the separate field >>>>>> in the ring. >>>>> >>>>> Hmm, wonder why do you think this is necessary? >>>>> From my perspective current behaviour is sufficient for TX-ing >>>>> multi-seg packets >>>>> over the ring. >>>>> >>>> >>>> I was thinking based on what some PMDs already doing, but right ring >>>> may not >>>> need to do it. >>>> >>>> Also for the case, one application is sending multi segmented packets >>>> to the >>>> ring, and other application pulling packets from the ring and sending >>>> to a PMD >>>> that does NOT support the multi-seg TX. I thought ring PMD claiming the >>>> multi-seg Tx support should serialize packets to support this case, >>>> but instead >>>> ring claiming 'DEV_RX_OFFLOAD_SCATTER' capability can work by pushing >>>> the >>>> responsibility to the application. >>>> >>>> So in this case ring should support both 'DEV_TX_OFFLOAD_MULTI_SEGS' & >>>> 'DEV_RX_OFFLOAD_SCATTER', what do you think? >>> >>> Seems so... >>> Another question - should we allow DEV_TX_OFFLOAD_MULTI_SEGS here, >>> if DEV_RX_OFFLOAD_SCATTER was not specified? >>> >> >> I think better to have a new version of the patch to claim both >> capabilities together. >> > > OK, I can do that and send a v2 to claim both caps together. > > Just so that it's clear to me though, these capabilities will only be > advertised and the current behavior of the ring PMD at tx/rx will remain > unchanged, right? > Yes, PMD behavior won't change, only PMD's hint to applications on what it supports will change. > >>> >>>> >>>>>> >>>>>>> >>>>>>> However, the fact that the ring PMD doesn't advertise this implicit >>>>>>> support forces applications that use ring PMD to have a special >>>>>>> case for >>>>>>> handling ring interfaces. If the ring PMD would advertise >>>>>>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be >>>>>>> oblivious >>>>>>> to the type of underlying interface. >>>>>>> >>>>>> >>>>>> This is not handling the special case for the ring PMD, this is why >>>>>> he have the >>>>>> offload capability flag. Application should behave according >>>>>> capability flags, >>>>>> not per specific PMD. >>>>>> >>>>>> Is there any specific usecase you are trying to cover? >>> >> > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 10:25 ` Ferruh Yigit 2020-09-28 11:00 ` Ananyev, Konstantin @ 2020-09-28 11:01 ` Bruce Richardson 2020-09-28 12:45 ` Ferruh Yigit 1 sibling, 1 reply; 15+ messages in thread From: Bruce Richardson @ 2020-09-28 11:01 UTC (permalink / raw) To: Ferruh Yigit; +Cc: Dumitru Ceara, dev On Mon, Sep 28, 2020 at 11:25:34AM +0100, Ferruh Yigit wrote: > On 9/28/2020 8:31 AM, Dumitru Ceara wrote: > > On 9/22/20 4:21 PM, Ferruh Yigit wrote: > > > On 9/18/2020 11:36 AM, Dumitru Ceara wrote: > > > > Even though ring interfaces don't support any other TX/RX offloads they > > > > do support sending multi segment packets and this should be advertised > > > > in order to not break applications that use ring interfaces. > > > > > > > > > > Does ring PMD support sending multi segmented packets? > > > > > > > Yes, sending multi segmented packets works fine with ring PMD. > > > > Define "works fine" :) > > All PMDs can put the first mbuf of the chained mbuf to the ring, in that > case what is the difference between the ones supports > 'DEV_TX_OFFLOAD_MULTI_SEGS' and the ones doesn't support? > > If the traffic is only from ring PMD to ring PMD, you won't recognize the > difference between segmented or not-segmented mbufs, and it will look like > segmented packets works fine. > But if there is other PMDs involved in the forwarding, or if need to process > the packets, will it still work fine? > What other PMDs do or don't do should be irrelevant here, I think. The fact that multi-segment PMDs make it though the ring PMD in valid form should be sufficient to mark it as supported. > > > As far as I can see ring PMD doesn't know about the mbuf segments. > > > > > > > Right, the PMD doesn't care about the mbuf segments but it implicitly > > supports sending multi segmented packets. From what I see it's actually > > the case for most of the PMDs, in the sense that most don't even check > > the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi > > segment packets they are just accepted. > > > > As far as I can see, if the segmented packets sent, the ring PMD will put > the first mbuf into the ring without doing anything specific to the next > segments. > > If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect > the segmented packets and put each chained mbuf into the separate field in > the ring. > Why, what would be the advantage of that? Right now if you send in a valid packet chain to the Ring PMD, you get a valid packet chain out again the other side, so I don't see what needs to change about that behaviour. > > > > However, the fact that the ring PMD doesn't advertise this implicit > > support forces applications that use ring PMD to have a special case for > > handling ring interfaces. If the ring PMD would advertise > > DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious > > to the type of underlying interface. > > > > This is not handling the special case for the ring PMD, this is why he have > the offload capability flag. Application should behave according capability > flags, not per specific PMD. > > Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support. 2020-09-28 11:01 ` Bruce Richardson @ 2020-09-28 12:45 ` Ferruh Yigit 0 siblings, 0 replies; 15+ messages in thread From: Ferruh Yigit @ 2020-09-28 12:45 UTC (permalink / raw) To: Bruce Richardson; +Cc: Dumitru Ceara, dev, Konstantin Ananyev On 9/28/2020 12:01 PM, Bruce Richardson wrote: > On Mon, Sep 28, 2020 at 11:25:34AM +0100, Ferruh Yigit wrote: >> On 9/28/2020 8:31 AM, Dumitru Ceara wrote: >>> On 9/22/20 4:21 PM, Ferruh Yigit wrote: >>>> On 9/18/2020 11:36 AM, Dumitru Ceara wrote: >>>>> Even though ring interfaces don't support any other TX/RX offloads they >>>>> do support sending multi segment packets and this should be advertised >>>>> in order to not break applications that use ring interfaces. >>>>> >>>> >>>> Does ring PMD support sending multi segmented packets? >>>> >>> >>> Yes, sending multi segmented packets works fine with ring PMD. >>> >> >> Define "works fine" :) >> >> All PMDs can put the first mbuf of the chained mbuf to the ring, in that >> case what is the difference between the ones supports >> 'DEV_TX_OFFLOAD_MULTI_SEGS' and the ones doesn't support? >> >> If the traffic is only from ring PMD to ring PMD, you won't recognize the >> difference between segmented or not-segmented mbufs, and it will look like >> segmented packets works fine. >> But if there is other PMDs involved in the forwarding, or if need to process >> the packets, will it still work fine? >> > > What other PMDs do or don't do should be irrelevant here, I think. The fact > that multi-segment PMDs make it though the ring PMD in valid form should be > sufficient to mark it as supported. > >>>> As far as I can see ring PMD doesn't know about the mbuf segments. >>>> >>> >>> Right, the PMD doesn't care about the mbuf segments but it implicitly >>> supports sending multi segmented packets. From what I see it's actually >>> the case for most of the PMDs, in the sense that most don't even check >>> the DEV_TX_OFFLOAD_MULTI_SEGS flag and if the application sends multi >>> segment packets they are just accepted. >>> >> >> As far as I can see, if the segmented packets sent, the ring PMD will put >> the first mbuf into the ring without doing anything specific to the next >> segments. >> >> If the 'DEV_TX_OFFLOAD_MULTI_SEGS' is supported I expect it should detect >> the segmented packets and put each chained mbuf into the separate field in >> the ring. >> > > Why, what would be the advantage of that? Right now if you send in a valid > packet chain to the Ring PMD, you get a valid packet chain out again the > other side, so I don't see what needs to change about that behaviour. > Got it. Konstantin also had similar comment, I have replied there. >>> >>> However, the fact that the ring PMD doesn't advertise this implicit >>> support forces applications that use ring PMD to have a special case for >>> handling ring interfaces. If the ring PMD would advertise >>> DEV_TX_OFFLOAD_MULTI_SEGS this would allow upper layers to be oblivious >>> to the type of underlying interface. >>> >> >> This is not handling the special case for the ring PMD, this is why he have >> the offload capability flag. Application should behave according capability >> flags, not per specific PMD. >> >> Is there any specific usecase you are trying to cover? ^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX. 2020-09-18 10:36 [dpdk-dev] [PATCH] net/ring: advertise multi segment support Dumitru Ceara 2020-09-22 14:21 ` Ferruh Yigit @ 2020-09-28 18:47 ` Dumitru Ceara 2020-09-29 8:37 ` Bruce Richardson 1 sibling, 1 reply; 15+ messages in thread From: Dumitru Ceara @ 2020-09-28 18:47 UTC (permalink / raw) To: dev; +Cc: bruce.richardson, ferruh.yigit, konstantin.ananyev Even though ring interfaces don't support any other TX/RX offloads they do support sending multi segment packets and this should be advertised in order to not break applications that use ring interfaces. Also advertise scatter RX support. Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- drivers/net/ring/rte_eth_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 40fe1ca..ac1ce1d 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -160,6 +160,8 @@ struct pmd_internals { dev_info->max_mac_addrs = 1; dev_info->max_rx_pktlen = (uint32_t)-1; dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues; + dev_info->rx_offload_capa = DEV_RX_OFFLOAD_SCATTER; + dev_info->tx_offload_capa = DEV_TX_OFFLOAD_MULTI_SEGS; dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues; dev_info->min_rx_bufsize = 0; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX. 2020-09-28 18:47 ` [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX Dumitru Ceara @ 2020-09-29 8:37 ` Bruce Richardson 2020-09-30 17:04 ` Ferruh Yigit 0 siblings, 1 reply; 15+ messages in thread From: Bruce Richardson @ 2020-09-29 8:37 UTC (permalink / raw) To: Dumitru Ceara; +Cc: dev, ferruh.yigit, konstantin.ananyev On Mon, Sep 28, 2020 at 08:47:29PM +0200, Dumitru Ceara wrote: > Even though ring interfaces don't support any other TX/RX offloads they > do support sending multi segment packets and this should be advertised > in order to not break applications that use ring interfaces. > > Also advertise scatter RX support. > > Signed-off-by: Dumitru Ceara <dceara@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX. 2020-09-29 8:37 ` Bruce Richardson @ 2020-09-30 17:04 ` Ferruh Yigit 0 siblings, 0 replies; 15+ messages in thread From: Ferruh Yigit @ 2020-09-30 17:04 UTC (permalink / raw) To: Bruce Richardson, Dumitru Ceara; +Cc: dev, konstantin.ananyev On 9/29/2020 9:37 AM, Bruce Richardson wrote: > On Mon, Sep 28, 2020 at 08:47:29PM +0200, Dumitru Ceara wrote: >> Even though ring interfaces don't support any other TX/RX offloads they >> do support sending multi segment packets and this should be advertised >> in order to not break applications that use ring interfaces. >> >> Also advertise scatter RX support. >> >> Signed-off-by: Dumitru Ceara <dceara@redhat.com> > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > Applied to dpdk-next-net/main, thanks. Note: I have added ring.ini in another patch, after it is accepted 'Scattered Rx' also needs to be as documented there after this patch. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-09-30 17:05 UTC | newest] Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-09-18 10:36 [dpdk-dev] [PATCH] net/ring: advertise multi segment support Dumitru Ceara 2020-09-22 14:21 ` Ferruh Yigit 2020-09-28 7:31 ` Dumitru Ceara 2020-09-28 10:25 ` Ferruh Yigit 2020-09-28 11:00 ` Ananyev, Konstantin 2020-09-28 12:42 ` Ferruh Yigit 2020-09-28 13:10 ` Ananyev, Konstantin 2020-09-28 13:26 ` Ferruh Yigit 2020-09-28 13:58 ` Dumitru Ceara 2020-09-28 15:02 ` Ferruh Yigit 2020-09-28 11:01 ` Bruce Richardson 2020-09-28 12:45 ` Ferruh Yigit 2020-09-28 18:47 ` [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX Dumitru Ceara 2020-09-29 8:37 ` Bruce Richardson 2020-09-30 17:04 ` Ferruh Yigit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).