Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
-- Damjan > On 7 Nov 2018, at 19:36, Coulson, Ken wrote: > > Latest comments inline in yellow below. > > > From: Damjan Marion mailto:dmar...@me.com>> > Date: Wednesday, November 7, 2018 at 7:34 AM > To: "Coulson, Ken" mailto:kcoul...@ciena.com>> > Cc: "vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>" <mailto:vpp-dev@lists.fd.io>> > Subject: Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions > > > -- > Damjan > > >> On 7 Nov 2018, at 16:01, Coulson, Ken > <mailto:kcoul...@ciena.com>> wrote: >> >> Our normal pattern for forwarding plane entities is create/modify/delete, >> the TAP v1 API fit nicely with that. >> The desire is to support changing the interface after it's created without >> deleting and re-creating to avoid as much potential traffic disruption as >> possible. >> An example is MTU (which neither v1 or v2 support). The desired maximum MTU >> may not be known at creation time or may change depending on routing so a >> modify capability seems appropriate. > > VPP have universal API (hw_interface_set_mtu ) for setting MTU on all > interfaces. > So the intent is that from cli the following would set mtu? > ‘set interface mtu 2000 tap0’ does not generate any errors but does not > appear to do anything. ‘ifconfig tap0’ still shows default mtu of 1500. TAP interface have 2 ends, one is on VPP another one is in linux. that API/CLI sets MTU in VPP->linux direction. In opposite direction you need to use linux tools to set MTU for linux->VPP direction. We may consider sending netlink message to kernel asking for different MTU on remote side, but i'm not sure if that is right thing to do or not, as MTU in theory can bi different on each end > > >> So be specific on your questions, want to control MTU and admin/link >> enable/disable, would like to know link status without polling. > > VPP have universal API (sw_interface_set_flags ) for setting link and admin > states. > You can subscribe to interface events with want_interface_events API to be > notified on change. > I’ll give this a try. > > >> >> DPDK TAP PMD (and vHost PMD) provide the same APIs as physical devices using >> the rte_eth_dev_*() functions allowing the next layer of code to very >> similar for physical and virtual devices. > > In some cases we run vPP without DPDK, DPDK is just one device driver option > for VPP. > Good reason! I hadn’t considered that. > > >> DPDK TAP PMD supports MTU, > > see above > > >> jumbo frames > > we support jumbo frames with tapv2. > Do you have some cli examples? I have tried with stock vpp and > as the mtu set does not appear to work I’m unclear how jumbos would work. See above... You can manually change MTU on linux side with "ifconfig" or "ip link". -- Damjan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11149): https://lists.fd.io/g/vpp-dev/message/11149 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
Latest comments inline in yellow below. From: Damjan Marion Date: Wednesday, November 7, 2018 at 7:34 AM To: "Coulson, Ken" Cc: "vpp-dev@lists.fd.io" Subject: Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions -- Damjan On 7 Nov 2018, at 16:01, Coulson, Ken mailto:kcoul...@ciena.com>> wrote: Our normal pattern for forwarding plane entities is create/modify/delete, the TAP v1 API fit nicely with that. The desire is to support changing the interface after it's created without deleting and re-creating to avoid as much potential traffic disruption as possible. An example is MTU (which neither v1 or v2 support). The desired maximum MTU may not be known at creation time or may change depending on routing so a modify capability seems appropriate. VPP have universal API (hw_interface_set_mtu ) for setting MTU on all interfaces. So the intent is that from cli the following would set mtu? ‘set interface mtu 2000 tap0’ does not generate any errors but does not appear to do anything. ‘ifconfig tap0’ still shows default mtu of 1500. So be specific on your questions, want to control MTU and admin/link enable/disable, would like to know link status without polling. VPP have universal API (sw_interface_set_flags ) for setting link and admin states. You can subscribe to interface events with want_interface_events API to be notified on change. I’ll give this a try. DPDK TAP PMD (and vHost PMD) provide the same APIs as physical devices using the rte_eth_dev_*() functions allowing the next layer of code to very similar for physical and virtual devices. In some cases we run vPP without DPDK, DPDK is just one device driver option for VPP. Good reason! I hadn’t considered that. DPDK TAP PMD supports MTU, see above jumbo frames we support jumbo frames with tapv2. Do you have some cli examples? I have tried with stock vpp and as the mtu set does not appear to work I’m unclear how jumbos would work. , extended statistics, what exact extended statistic you are looking for? DPDK maintains some statistics for TAPs (and vHost) but since they are software counters and cost cpu cycles to maintain the list is pretty thin. There are rx packets,bytes,errors,no_mem_buff and tx packets,bytes,errors. An example of an error I don’t seem to see is if the rx packet is greater than mtu. link status change notifications see above plus likely other features. like? These seem to me to be an advantage and not a drawback. I'm curious about the drawbacks mentioned and advantages of the VPP implementation, could you provide a more detail? More information will certainly help! main drawback that it requires external dependency on DPDK which in some use cases we don't want. Not sure if TAP PMD supports interrupt mode and dynamic interface creation/deletion but VPP native driver does. I believe TAP PMD does not support an ‘interrupt’ mode. It’s actually not really a true interrupt but a signal indicating the driver has packets. Also all DPDK drivers have extra cost of converting metadata and dealing with 2 more cachelines per packet in LLC (not big deal in case of tap) so unless we really do bad job native driver will always be faster and simpler. TAP interface is not rocket science, it may be that we are missing few features mainly due to my ignorance, but i don't expect anything what cannot be added/extended in few dozen lines of code. I hope people will pick it up and contribute... -- Damjan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11148): https://lists.fd.io/g/vpp-dev/message/11148 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
-- Damjan > On 7 Nov 2018, at 16:01, Coulson, Ken wrote: > > Our normal pattern for forwarding plane entities is create/modify/delete, the > TAP v1 API fit nicely with that. > The desire is to support changing the interface after it's created without > deleting and re-creating to avoid as much potential traffic disruption as > possible. > An example is MTU (which neither v1 or v2 support). The desired maximum MTU > may not be known at creation time or may change depending on routing so a > modify capability seems appropriate. VPP have universal API (hw_interface_set_mtu ) for setting MTU on all interfaces. > So be specific on your questions, want to control MTU and admin/link > enable/disable, would like to know link status without polling. VPP have universal API (sw_interface_set_flags ) for setting link and admin states. You can subscribe to interface events with want_interface_events API to be notified on change. > > DPDK TAP PMD (and vHost PMD) provide the same APIs as physical devices using > the rte_eth_dev_*() functions allowing the next layer of code to very similar > for physical and virtual devices. In some cases we run vPP without DPDK, DPDK is just one device driver option for VPP. > DPDK TAP PMD supports MTU, see above > jumbo frames we support jumbo frames with tapv2. > , extended statistics, what exact extended statistic you are looking for? > link status change notifications see above > plus likely other features. like? > These seem to me to be an advantage and not a drawback. > I'm curious about the drawbacks mentioned and advantages of the VPP > implementation, could you provide a more detail? More information will > certainly help! main drawback that it requires external dependency on DPDK which in some use cases we don't want. Not sure if TAP PMD supports interrupt mode and dynamic interface creation/deletion but VPP native driver does. Also all DPDK drivers have extra cost of converting metadata and dealing with 2 more cachelines per packet in LLC (not big deal in case of tap) so unless we really do bad job native driver will always be faster and simpler. TAP interface is not rocket science, it may be that we are missing few features mainly due to my ignorance, but i don't expect anything what cannot be added/extended in few dozen lines of code. I hope people will pick it up and contribute... -- Damjan-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11146): https://lists.fd.io/g/vpp-dev/message/11146 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
Our normal pattern for forwarding plane entities is create/modify/delete, the TAP v1 API fit nicely with that. The desire is to support changing the interface after it's created without deleting and re-creating to avoid as much potential traffic disruption as possible. An example is MTU (which neither v1 or v2 support). The desired maximum MTU may not be known at creation time or may change depending on routing so a modify capability seems appropriate. So be specific on your questions, want to control MTU and admin/link enable/disable, would like to know link status without polling. DPDK TAP PMD (and vHost PMD) provide the same APIs as physical devices using the rte_eth_dev_*() functions allowing the next layer of code to very similar for physical and virtual devices. DPDK TAP PMD supports MTU, jumbo frames, extended statistics, link status change notifications, plus likely other features. These seem to me to be an advantage and not a drawback. I'm curious about the drawbacks mentioned and advantages of the VPP implementation, could you provide a more detail? More information will certainly help! Ken Coulson From: Damjan Marion Date: Tuesday, November 6, 2018 at 9:36 AM To: "Coulson, Ken" Cc: "vpp-dev@lists.fd.io" Subject: Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions On 6 Nov 2018, at 18:19, Coulson, Ken mailto:kcoul...@ciena.com>> wrote: I didn’t hear anything back on questions below so re-posting again for another attempt at answers. Ken Coulson From: mailto:vpp-dev@lists.fd.io>> on behalf of "Coulson, Ken" mailto:kcoul...@ciena.com>> Date: Wednesday, October 31, 2018 at 11:10 AM To: "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" mailto:vpp-dev@lists.fd.io>> Subject: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions Per emails on this list tap v1 is being deprecated. tap v1 create/modify/delete and tap v2 is different in that it only has create/delete. Some questions: Is the intent to create a tap v2 modify API and/or to add capabilities to set interface API? What exactly would you like to modify? What capabilities? tap APIs presently have no MTU setting. Is there any plan to add that capability? Isn't there generic API for that? Is there any plan to use DPDK tap PMD? I don't see any benefits and I see several drawbacks of doing that. Why do you ask? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11144): https://lists.fd.io/g/vpp-dev/message/11144 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
> On 6 Nov 2018, at 18:19, Coulson, Ken wrote: > > I didn’t hear anything back on questions below so re-posting again for > another attempt at answers. > > Ken Coulson > > > > From: mailto:vpp-dev@lists.fd.io>> on behalf of > "Coulson, Ken" mailto:kcoul...@ciena.com>> > Date: Wednesday, October 31, 2018 at 11:10 AM > To: "vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>" <mailto:vpp-dev@lists.fd.io>> > Subject: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions > > Per emails on this list tap v1 is being deprecated. > tap v1 create/modify/delete and tap v2 is different in that it only has > create/delete. > > Some questions: > Is the intent to create a tap v2 modify API and/or to add capabilities to set > interface API? What exactly would you like to modify? What capabilities? > tap APIs presently have no MTU setting. Is there any plan to add that > capability? Isn't there generic API for that? > Is there any plan to use DPDK tap PMD? I don't see any benefits and I see several drawbacks of doing that. Why do you ask? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11130): https://lists.fd.io/g/vpp-dev/message/11130 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions
I didn’t hear anything back on questions below so re-posting again for another attempt at answers. Ken Coulson From: on behalf of "Coulson, Ken" Date: Wednesday, October 31, 2018 at 11:10 AM To: "vpp-dev@lists.fd.io" Subject: [**EXTERNAL**] [vpp-dev] TAP v1/v2 API questions Per emails on this list tap v1 is being deprecated. tap v1 create/modify/delete and tap v2 is different in that it only has create/delete. Some questions: Is the intent to create a tap v2 modify API and/or to add capabilities to set interface API? tap APIs presently have no MTU setting. Is there any plan to add that capability? Is there any plan to use DPDK tap PMD? Ken Coulson -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11129): https://lists.fd.io/g/vpp-dev/message/11129 Mute This Topic: https://lists.fd.io/mt/27873113/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] TAP v1/v2 API questions
Per emails on this list tap v1 is being deprecated. tap v1 create/modify/delete and tap v2 is different in that it only has create/delete. Some questions: Is the intent to create a tap v2 modify API and/or to add capabilities to set interface API? tap APIs presently have no MTU setting. Is there any plan to add that capability? Is there any plan to use DPDK tap PMD? Ken Coulson -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11056): https://lists.fd.io/g/vpp-dev/message/11056 Mute This Topic: https://lists.fd.io/mt/27808322/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-