search for: dtrt

Displaying 20 results from an estimated 145 matches for "dtrt".

Did you mean: dtr
2014 Mar 22
3
[LLVMdev] [RFC] Moving OnDiskHashTable from clang to LLVM
...something like "llvm::endian::little" or >> "llvm::le" be more reasonable? > > Llvm has lib/support/endian.h. Wouldn't the new API be redundant? If > not, would it fit in that header? They're obviously related. Endian.h defines types like ulittle32, which DTRT when read and written from memory, whereas clang::io has functions to read and write memory like so: void Emit32(raw_ostream& Out, uint32_t V); uint32_t ReadLE32(const unsigned char *&Data); uint32_t ReadUnalignedLE32(const unsigned char *&Data); The (aligned) ReadLE32 is...
2014 Nov 27
4
[PATCH RFC v4 00/16] qemu: towards virtio-1 host support
...a device property configured with the device; and for pci, > > whatever the mechanism is there :) > > > > A transport not implementing this callback is simply considered > > legacy-only. > > I dislike callbacks. Let's just give all info to core, > and have it DTRT. > Have a is_legacy flag in the vdev that is initialized to 1, and transports can unset it when the revision is negotiated or during init?
2014 Nov 27
4
[PATCH RFC v4 00/16] qemu: towards virtio-1 host support
...a device property configured with the device; and for pci, > > whatever the mechanism is there :) > > > > A transport not implementing this callback is simply considered > > legacy-only. > > I dislike callbacks. Let's just give all info to core, > and have it DTRT. > Have a is_legacy flag in the vdev that is initialized to 1, and transports can unset it when the revision is negotiated or during init?
2019 Jul 22
2
[PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call
...by: Christoph Hellwig <hch at lst.de> Christoph, I wonder why did you suggest this? The connection between dma_mask and dma_max_mapping_size is far from obvious. The documentation doesn't exist. Do we really have to teach all users about this hack? Why not just make dma_max_mapping_size DTRT? > --- > drivers/virtio/virtio_ring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index c8be1c4f5b55..37c143971211 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio...
2019 Jul 22
2
[PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call
...by: Christoph Hellwig <hch at lst.de> Christoph, I wonder why did you suggest this? The connection between dma_mask and dma_max_mapping_size is far from obvious. The documentation doesn't exist. Do we really have to teach all users about this hack? Why not just make dma_max_mapping_size DTRT? > --- > drivers/virtio/virtio_ring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index c8be1c4f5b55..37c143971211 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio...
2012 Oct 16
2
cannot coerce class '"rle"' into a data.frame
..."4bbf9e94cbceb70c BG bg" "4fbbf2c67e0fb867 SK sk" ... > as.data.frame(rle) Error in as.data.frame.default(vertices.rle) : cannot coerce class '"rle"' into a data.frame it seems that rle.df <- data.frame(values=rle$values,length=rle$length) works and DTRT. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://iris.org.il http://memri.org http://www.PetitionOnline.com/tap12009/ http://camera.org char*a="char*a=%c%s%c;main(){printf(a,34,a,34);}";main(){printf(a,34,a,34);}
2004 Apr 02
2
Futzing with TaskScheduler
...he more I think it was too faithful to the C API. Right now I''m looking at the trigger() method. For example, I don''t see any reason to make the "type" key take a hash as an argument (thus creating a nested hash) when none of the keys are duplicate. We should just DTRT (do the right thing). Also, I mostly dislike camel case and I''m not sure what logic MS used when it chose "BeginX" versus "StartX". I''m just going to use "start". So for now I''m looking at something like this: t = Trigger.new(task_name...
2020 Apr 09
3
Delete Phabricator metadata tags before committing
...gt; https://github.com/phacility/phabricator/blob/cac3dc4983c3671ba4ec841aac8efac10744a80c/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php > > > > Seems straightforward(-ish) to drop the relevant fields there, that way > `arc land` automatically DTRT. > > > > Jon > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/23b8e721/attachment.html>
2018 Apr 03
2
[RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device
...r_setg(errp, "%s is not a device on pci bus", id); > + return -1; > + } > + busnum = (uint16_t)pci_bus_num(PCI_BUS(bus)); > + } pci_bus_num is almost always a bug if not done within a context of a PCI host, bridge, etc. In particular this will not DTRT if run before guest assigns bus numbers. > + > + if (!devfn) > + goto out; > + > + pd = strchr(pc, '.'); > + pe = get_opt_name(value, sizeof(value), pc + 1, '.'); > + if (pe != pc + 1) { > + parse_option_number("slot", va...
2020 Feb 21
3
Re: alternatives for hooking dlopen() without LD_LIBRARY_PATH or LD_AUDIT?
...ean another path (or overloading the meaning of the plugin path) and just makes the whole thing more fragile and complex. Having said all that, what would also solve this is either an API for updating LD_LIBRARY_PATH after the program has started; or making setenv ("LD_LIBRARY_PATH",...) DTRT*; or some kind of dlopen() variant which takes a library path as an extra parameter. Rich. * “Why does setenv ("LD_LIBRARY_PATH") not work?” has several stackoverflow answers. Apparently even the JDK has to work around this by re-execing. https://www.google.com/search?q=setenv+%22LD_LI...
2016 Sep 02
2
Adding [[nodiscard]] to Compiler.h
...lly, but please make the difference between > LLVM_NODISCARD and LLVM_UNUSED_RESULT clear in the code. :) Right, this is where it gets a little weird. LLVM_NODISCARD would be for types, whereas LLVM_UNUSED_RESULT would be for functions. Depending on your host compiler, using the wrong one might DTRT, but it won't across all compilers. Do you think documenting this is sufficient, or should we try to name these to better represent where they should be used? > However, we have to make a policy decision here: if I have a > LLVM_NODISCARD "Error" class should functions that r...
2017 Jan 06
2
[PATCH V4 net-next 3/3] tun: rx batching
...htool_coalesce *ec) > +{ > + struct tun_struct *tun = netdev_priv(dev); > + > + if (ec->rx_max_coalesced_frames > NAPI_POLL_WEIGHT) > + return -EINVAL; So what should userspace do? Keep trying until it succeeds? I think it's better to just use NAPI_POLL_WEIGHT instead and DTRT here. > + > + tun->rx_batched = ec->rx_max_coalesced_frames; > + > + return 0; > +} > + > static const struct ethtool_ops tun_ethtool_ops = { > .get_settings = tun_get_settings, > .get_drvinfo = tun_get_drvinfo, > @@ -2446,6 +2508,8 @@ static const struct e...
2017 Jan 06
2
[PATCH V4 net-next 3/3] tun: rx batching
...htool_coalesce *ec) > +{ > + struct tun_struct *tun = netdev_priv(dev); > + > + if (ec->rx_max_coalesced_frames > NAPI_POLL_WEIGHT) > + return -EINVAL; So what should userspace do? Keep trying until it succeeds? I think it's better to just use NAPI_POLL_WEIGHT instead and DTRT here. > + > + tun->rx_batched = ec->rx_max_coalesced_frames; > + > + return 0; > +} > + > static const struct ethtool_ops tun_ethtool_ops = { > .get_settings = tun_get_settings, > .get_drvinfo = tun_get_drvinfo, > @@ -2446,6 +2508,8 @@ static const struct e...
2007 Apr 11
1
heads-up: PV and HVM save routines in libxc have merged
...into a single xc_domain_save() function. I''ve tried to DTRT with the IA64 version. Cheers, Tim. -- Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited Registered office c/o EC2Y 5EB, UK; company number 05334508 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/x...
2017 Jan 09
1
[PATCH V4 net-next 3/3] tun: rx batching
...uct *tun = netdev_priv(dev); > > > + > > > + if (ec->rx_max_coalesced_frames > NAPI_POLL_WEIGHT) > > > + return -EINVAL; > > So what should userspace do? Keep trying until it succeeds? > > I think it's better to just use NAPI_POLL_WEIGHT instead and DTRT here. > > > > Well, looking at how set_coalesce is implemented in other drivers, -EINVAL > is usually used when user give a value that exceeds the limitation. For > tuntap, what missed here is probably just a documentation for coalescing in > tuntap.txt. (Or extend ethtool to...
2017 Jan 09
1
[PATCH V4 net-next 3/3] tun: rx batching
...uct *tun = netdev_priv(dev); > > > + > > > + if (ec->rx_max_coalesced_frames > NAPI_POLL_WEIGHT) > > > + return -EINVAL; > > So what should userspace do? Keep trying until it succeeds? > > I think it's better to just use NAPI_POLL_WEIGHT instead and DTRT here. > > > > Well, looking at how set_coalesce is implemented in other drivers, -EINVAL > is usually used when user give a value that exceeds the limitation. For > tuntap, what missed here is probably just a documentation for coalescing in > tuntap.txt. (Or extend ethtool to...
2018 Apr 05
1
[virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device
On 04/04/2018 10:02, Siwei Liu wrote: >> pci_bus_num is almost always a bug if not done within >> a context of a PCI host, bridge, etc. >> >> In particular this will not DTRT if run before guest assigns bus >> numbers. >> > I was seeking means to reserve a specific pci bus slot from drivers, > and update the driver when guest assigns the bus number but it seems > there's no low-hanging fruits. Because of that reason the bus_num is > only obta...
2020 Apr 09
3
Delete Phabricator metadata tags before committing
...vm.org's fork of phab? https://github.com/phacility/phabricator/blob/cac3dc4983c3671ba4ec841aac8efac10744a80c/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php Seems straightforward(-ish) to drop the relevant fields there, that way `arc land` automatically DTRT. Jon On Fri, Dec 27, 2019 at 11:30 PM Mehdi AMINI via llvm-dev < llvm-dev at lists.llvm.org> wrote: > > > On Fri, Dec 27, 2019 at 12:48 PM Fangrui Song via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Many git commits in the monorepo look like the followi...
2020 Feb 21
2
Re: alternatives for hooking dlopen() without LD_LIBRARY_PATH or LD_AUDIT?
...he plugin > > path) and just makes the whole thing more fragile and complex. > > > > Having said all that, what would also solve this is either an API for > > updating LD_LIBRARY_PATH after the program has started; or making > > setenv ("LD_LIBRARY_PATH",...) DTRT*; or some kind of dlopen() variant > > which takes a library path as an extra parameter. > > Have you tried adding DT_RUNPATH or DT_RPATH to nbdkit-vddk-plugin.so? > Or does the path have to be chosen dynamically? To be clear, the situation is: nbdkit (free) -> dlopens nbd...
2013 Jul 15
2
[LLVMdev] [PATCH] x86/asm: avoid mnemonics without type suffix
...there, done that. Assemblers that are worse than gas are not worth working with. gas should be considered the minimal implementation quality, and llvm-as should strive to do better rather than worse.. (NASM used to be *much* more pleasant to work with than gas. Maybe you should strive to make nasm DTRT wrt bt and constants, and maintain that lead?) Linus