net/ring: advertise multi segment support.
PATCH 1/1 net/ring: advertise multi segment support.
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.
--- drivers/net/ring/rte_eth_ring.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ring/rte_eth_ring.c +1 -0
@@ -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 ;
Signature · 1 line
1.8.3.1
Quoted 4 lines · Dumitru Ceara
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.
Quoted 19 lines
Signed-off-by Dumitru Ceara <[email protected]>--- drivers/net/ring/rte_eth_ring.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ring/rte_eth_ring.c +1
-0@@ -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 ;
Quoted 8 lines · Ferruh Yigit
Quoted 4 lines · Dumitru Ceara
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.
Quoted 2 lines
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
Quoted 7 lines · Dumitru Ceara
Quoted 6 lines · Ferruh Yigit
Quoted 4 lines · Dumitru Ceara
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.
Quoted 5 lines
Quoted 2 lines
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?
Quoted 9 lines
Quoted 2 lines
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_SEGSflag 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.
Quoted 7 lines
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_SEGSthis 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?
Quoted 36 lines · Dumitru Ceara
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Dumitru Ceara
Quoted 4 lines
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.
Quoted 5 lines
Quoted 2 lines
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?Quoted 9 lines
Quoted 2 lines
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_SEGSflag and if the application sends multi segment packets they are just accepted.
Quoted 5 lines
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.
Quoted 14 lines
Quoted 8 lines
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_SEGSthis 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?
Quoted 39 lines · Konstantin
Quoted 39 lines · Dumitru Ceara
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Dumitru Ceara
Quoted 4 lines
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.
Quoted 5 lines
Quoted 2 lines
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?Quoted 9 lines
Quoted 2 lines
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_SEGSflag 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.
Quoted 7 lines
Quoted 2 lines
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?
Quoted 14 lines
Quoted 14 lines
Quoted 8 lines
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_SEGSthis 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?
Quoted 67 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 28, 2020 1:43 PM
To: Ananyev, Konstantin <[email protected]>; Dumitru Ceara <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support.Quoted 39 lines · Konstantin
Quoted 39 lines · Dumitru Ceara
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Dumitru Ceara
Quoted 4 lines
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.
Quoted 5 lines
Quoted 2 lines
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?Quoted 9 lines
Quoted 2 lines
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_SEGSflag 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.
Quoted 7 lines
Quoted 2 lines
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.
Quoted 2 lines
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?
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 9 lines
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_SEGSthis 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?
Quoted 67 lines · Konstantin
Quoted 67 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 28, 2020 1:43 PM
To: Ananyev, Konstantin <[email protected]>; Dumitru Ceara <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support.Quoted 39 lines · Konstantin
Quoted 39 lines · Dumitru Ceara
Quoted 7 lines · Ferruh Yigit
Quoted 6 lines · Dumitru Ceara
Quoted 4 lines
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.
Quoted 5 lines
Quoted 2 lines
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?Quoted 9 lines
Quoted 2 lines
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_SEGSflag 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.
Quoted 7 lines
Quoted 2 lines
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.
Quoted 7 lines
Quoted 2 lines
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 allowDEV_TX_OFFLOAD_MULTI_SEGShere,
ifDEV_RX_OFFLOAD_SCATTERwas not specified?
I think better to have a new version of the patch to claim both capabilities together.
Quoted 17 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 10 lines
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_SEGSthis 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?
Quoted 92 lines · Ferruh Yigit
Quoted 91 lines · Konstantin
Quoted 90 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 28, 2020 1:43 PM
To: Ananyev, Konstantin <[email protected]>; Dumitru Ceara <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support.Quoted 55 lines · Konstantin
Quoted 50 lines · Dumitru Ceara
Quoted 9 lines · Ferruh Yigit
Quoted 8 lines · Dumitru Ceara
Quoted 6 lines
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.Quoted 5 lines
Quoted 2 lines
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?Quoted 10 lines
Quoted 2 lines
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
theDEV_TX_OFFLOAD_MULTI_SEGSflag 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.Quoted 4 lines
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.Quoted 5 lines
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?
Quoted 8 lines
Quoted 4 lines
Seems so...
Another question - should we allowDEV_TX_OFFLOAD_MULTI_SEGShere, ifDEV_RX_OFFLOAD_SCATTERwas 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
Quoted 22 lines
Quoted 21 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 4 lines
Quoted 8 lines
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 advertiseDEV_TX_OFFLOAD_MULTI_SEGSthis 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?
Quoted 102 lines · Dumitru Ceara
Quoted 92 lines · Ferruh Yigit
Quoted 91 lines · Konstantin
Quoted 90 lines
-----Original Message-----
From: Ferruh Yigit <[email protected]>
Sent: Monday, September 28, 2020 1:43 PM
To: Ananyev, Konstantin <[email protected]>; Dumitru Ceara <[email protected]>; [email protected]
Cc: Richardson, Bruce <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] net/ring: advertise multi segment support.Quoted 55 lines · Konstantin
Quoted 50 lines · Dumitru Ceara
Quoted 9 lines · Ferruh Yigit
Quoted 8 lines · Dumitru Ceara
Quoted 6 lines
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.Quoted 5 lines
Quoted 2 lines
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?Quoted 10 lines
Quoted 2 lines
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
theDEV_TX_OFFLOAD_MULTI_SEGSflag 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.Quoted 4 lines
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.Quoted 5 lines
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?Quoted 8 lines
Quoted 4 lines
Seems so...
Another question - should we allowDEV_TX_OFFLOAD_MULTI_SEGShere,
ifDEV_RX_OFFLOAD_SCATTERwas not specified?I think better to have a new version of the patch to claim both capabilities together.
Quoted 6 lines
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.
Quoted 24 lines
Quoted 23 lines
Quoted 22 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 5 lines
Quoted 8 lines
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 advertiseDEV_TX_OFFLOAD_MULTI_SEGSthis 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?
Quoted 20 lines · Ferruh Yigit
Quoted 7 lines · Dumitru Ceara
Quoted 6 lines · Ferruh Yigit
Quoted 4 lines · Dumitru Ceara
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.
Quoted 5 lines
Quoted 2 lines
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?
Quoted 6 lines
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.
Quoted 10 lines
Quoted 9 lines
Quoted 2 lines
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_SEGSflag and if the application sends multi segment packets they are just accepted.
Quoted 8 lines
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.
Quoted 13 lines
Quoted 7 lines
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_SEGSthis 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?
Quoted 46 lines · Bruce Richardson
Quoted 20 lines · Ferruh Yigit
Quoted 7 lines · Dumitru Ceara
Quoted 6 lines · Ferruh Yigit
Quoted 4 lines · Dumitru Ceara
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.
Quoted 5 lines
Quoted 2 lines
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?Quoted 6 lines
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.
Quoted 14 lines
Quoted 9 lines
Quoted 2 lines
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_SEGSflag 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.
Quoted 9 lines
Quoted 4 lines
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.
Quoted 13 lines
Quoted 13 lines
Quoted 7 lines
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_SEGSthis 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?
PATCH v2 1/1 net/ring: advertise multi segment TX and scatter RX.
In reply to Dumitru CearaEven 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.
--- drivers/net/ring/rte_eth_ring.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ring/rte_eth_ring.c +2 -0
@@ -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 ;
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX.
Quoted 7 lines · Dumitru Ceara
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 <[email protected]>
Ferruh Yigit
AppliedRe: [dpdk-dev] [PATCH v2] net/ring: advertise multi segment TX and scatter RX.
Quoted 11 lines · Bruce Richardson
Quoted 7 lines · Dumitru Ceara
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 <[email protected]>Acked-by Bruce Richardson <[email protected]>
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.