search for: new_len

Displaying 20 results from an estimated 43 matches for "new_len".

2016 Jun 30
2
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7a0b616..6e4f347 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); > > static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) > { > - dev->tx_queue_len = new_len; > + int res, orig_len = dev->tx_queue_len; > + > + if (new_len != orig_len) { > + dev->tx_queue_len = new_len; > + res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); > + res = notifier_to_errno(res); > + if...
2016 Jun 30
2
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c > index 7a0b616..6e4f347 100644 > --- a/net/core/net-sysfs.c > +++ b/net/core/net-sysfs.c > @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); > > static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) > { > - dev->tx_queue_len = new_len; > + int res, orig_len = dev->tx_queue_len; > + > + if (new_len != orig_len) { > + dev->tx_queue_len = new_len; > + res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); > + res = notifier_to_errno(res); > + if...
2016 Jun 30
1
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...sysfs.c >>> index 7a0b616..6e4f347 100644 >>> --- a/net/core/net-sysfs.c >>> +++ b/net/core/net-sysfs.c >>> @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); >>> static int change_tx_queue_len(struct net_device *dev, unsigned >>> long new_len) >>> { >>> - dev->tx_queue_len = new_len; >>> + int res, orig_len = dev->tx_queue_len; >>> + >>> + if (new_len != orig_len) { >>> + dev->tx_queue_len = new_len; >>> + res = call_netdevice_notifiers(NETD...
2016 Jun 30
1
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...sysfs.c >>> index 7a0b616..6e4f347 100644 >>> --- a/net/core/net-sysfs.c >>> +++ b/net/core/net-sysfs.c >>> @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); >>> static int change_tx_queue_len(struct net_device *dev, unsigned >>> long new_len) >>> { >>> - dev->tx_queue_len = new_len; >>> + int res, orig_len = dev->tx_queue_len; >>> + >>> + if (new_len != orig_len) { >>> + dev->tx_queue_len = new_len; >>> + res = call_netdevice_notifiers(NETD...
2016 Jun 30
0
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...-sysfs.c b/net/core/net-sysfs.c >> index 7a0b616..6e4f347 100644 >> --- a/net/core/net-sysfs.c >> +++ b/net/core/net-sysfs.c >> @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); >> >> static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) >> { >> - dev->tx_queue_len = new_len; >> + int res, orig_len = dev->tx_queue_len; >> + >> + if (new_len != orig_len) { >> + dev->tx_queue_len = new_len; >> + res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); >> + res = n...
2016 Jun 30
0
[PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...er(struct notifier_block *nb); diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7a0b616..6e4f347 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) { - dev->tx_queue_len = new_len; + int res, orig_len = dev->tx_queue_len; + + if (new_len != orig_len) { + dev->tx_queue_len = new_len; + res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); + res = notifier_to_errno(res); + if (res) { + netdev_err(dev, + "re...
2016 Jun 30
0
[PATCH net-next V4 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
...er(struct notifier_block *nb); diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 7a0b616..6e4f347 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -322,7 +322,20 @@ NETDEVICE_SHOW_RW(flags, fmt_hex); static int change_tx_queue_len(struct net_device *dev, unsigned long new_len) { - dev->tx_queue_len = new_len; + int res, orig_len = dev->tx_queue_len; + + if (new_len != orig_len) { + dev->tx_queue_len = new_len; + res = call_netdevice_notifiers(NETDEV_CHANGE_TX_QUEUE_LEN, dev); + res = notifier_to_errno(res); + if (res) { + netdev_err(dev, + "re...
2010 Jul 12
1
[PATCH] ocfs2: Don't duplicate page passes i_size during CoW.
...unsigned int from, to; loff_t offset, end, map_end; struct address_space *mapping = context->inode->i_mapping; @@ -2932,12 +2932,20 @@ static int ocfs2_duplicate_clusters_by_page(handle_t *handle, offset = ((loff_t)cpos) << OCFS2_SB(sb)->s_clustersize_bits; end = offset + (new_len << OCFS2_SB(sb)->s_clustersize_bits); + last_page = i_size_read(context->inode) >> PAGE_CACHE_SHIFT; while (offset < end) { page_index = offset >> PAGE_CACHE_SHIFT; map_end = ((loff_t)page_index + 1) << PAGE_CACHE_SHIFT; if (map_end > end) map_en...
2013 Jun 12
3
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Wed, 12 Jun, at 11:17:44AM, Gerardo Exequiel Pozzi wrote: > Cool thanks!. Now looks better, but still not work. > > For some reason, "ldlinux.c32" is apparently sent but "Failed to load" > by PXELINUX and few seconds later, dnsmasq shows an error message > "failed sending": Argh! The patch was broken. I missed the new core/path.c file. My bad.
2013 Jun 12
5
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...ile(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\n", p+4); } else if (looking_at(p, "path")) { - /* PATH-based lookup */ - const char *new_path; - char *_p; - size_t len, new_len; - - new_path = refstrdup(skipspace(p + 4)); - len = strlen(PATH); - new_len = strlen(new_path); - _p = malloc(len + new_len + 2); - if (_p) { - strncpy(_p, PATH, len); - _p[len++] = ':'; - strncpy(_p + len, new_path, new_len); - _p[len + new_len] = '\0'; - free(PATH)...
2013 Aug 29
0
[PATCH] Btrfs: allow partial ordered extent completion
...nish_ordered_io */ - if (TestClearPagePrivate2(page) && - btrfs_dec_test_ordered_pending(inode, &ordered, page_start, - PAGE_CACHE_SIZE, 1)) { - btrfs_finish_ordered_io(ordered); + if (TestClearPagePrivate2(page)) { + struct btrfs_ordered_inode_tree *tree; + u64 new_len; + + tree = &BTRFS_I(inode)->ordered_tree; + + spin_lock_irq(&tree->lock); + set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags); + new_len = page_start - ordered->file_offset; + if (new_len < ordered->truncated_len) + ordered->truncated_len = new_len; +...
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...ile(FILE * f) { char line[MAX_LINE], *p, *ep, ch; @@ -1337,24 +1370,8 @@ do_include: } else if (looking_at(p, "say")) { printf("%s\n", p+4); } else if (looking_at(p, "path")) { - /* PATH-based lookup */ - const char *new_path; - char *_p; - size_t len, new_len; - - new_path = refstrdup(skipspace(p + 4)); - len = strlen(PATH); - new_len = strlen(new_path); - _p = malloc(len + new_len + 2); - if (_p) { - strncpy(_p, PATH, len); - _p[len++] = ':'; - strncpy(_p + len, new_path, new_len); - _p[len + new_len] = '\0'; - free(PATH)...
2013 Jun 11
2
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
On Mon, 10 Jun, at 07:57:50AM, H. Peter Anvin wrote: > Either that or make the path a list rather than a string, using the > normal word separators when entered on the command line, a bit like the > (t)csh does. That is a bigger change but is probably a better solution. How would this solution handle filenames containing spaces? Would we need to escape (presumably with a backslash)
2016 Jun 30
9
[PATCH net-next V3 0/6] switch to use tx skb array in tun
Hi all: This series tries to switch to use skb array in tun. This is used to eliminate the spinlock contention between producer and consumer. The conversion was straightforward: just introdce a tx skb array and use it instead of sk_receive_queue. A minor issue is to keep the tx_queue_len behaviour, since tun used to use it for the length of sk_receive_queue. This is done through: - add the
2016 Jun 30
9
[PATCH net-next V3 0/6] switch to use tx skb array in tun
Hi all: This series tries to switch to use skb array in tun. This is used to eliminate the spinlock contention between producer and consumer. The conversion was straightforward: just introdce a tx skb array and use it instead of sk_receive_queue. A minor issue is to keep the tx_queue_len behaviour, since tun used to use it for the length of sk_receive_queue. This is done through: - add the
2013 Jun 12
0
[5.10] PXE + dhcp opts 209, 210 and path issues in tftp/http
...], *p, *ep, ch; > @@ -1337,24 +1370,8 @@ do_include: > } else if (looking_at(p, "say")) { > printf("%s\n", p+4); > } else if (looking_at(p, "path")) { > - /* PATH-based lookup */ > - const char *new_path; > - char *_p; > - size_t len, new_len; > - > - new_path = refstrdup(skipspace(p + 4)); > - len = strlen(PATH); > - new_len = strlen(new_path); > - _p = malloc(len + new_len + 2); > - if (_p) { > - strncpy(_p, PATH, len); > - _p[len++] = ':'; > - strncpy(_p + len, new_path, new_len); > -...
2002 Jun 18
3
FINDNEXT problem, w2k and linux smbfs
...public static void main(String args[]) { String directory = args[0]; File orig_dir = new File(directory); File orig_fl[] = orig_dir.listFiles(); int orig_len = orig_fl.length; int cnt = 0; int er_cnt = 0; do { File new_dir = new File(directory); File new_fl[] = new_dir.listFiles(); int new_len = new_fl.length; cnt ++; if (new_len != orig_len) { er_cnt ++; System.out.print(" new:" + new_len + "!= old:" + orig_len + " "); } new_dir = null; new_fl = null; System.out.println(er_cnt + "-cnt" + cnt); } while (er_cnt <...
2017 Feb 23
2
[PATCH 1/3] inspect: add source and summary to internal add_application
This way source and summary can be specified for any package read from the guest. --- lib/inspect-apps.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/inspect-apps.c b/lib/inspect-apps.c index 1216c52..eabe565 100644 --- a/lib/inspect-apps.c +++ b/lib/inspect-apps.c @@ -51,7 +51,7 @@ static struct guestfs_application2_list *list_applications_deb
2007 Feb 24
2
SHA256 password patch
Hi, I made a patch against branch-1.0 for SHA256 password hashing support for Dovecot. Courier Authlib supports this hashing scheme and in order to migrate from Courier to Dovecot, I've added SHA256 support to Dovecot. The attached patch is based on BSD licensed code from Olivier Gay (http://www.ouah.org/ogay/sha2/). Changes made by me in Olivier's sha2{.h,.c} code: - Prototype for
2019 Sep 03
0
[PATCH v2 27/27] drm/dp_mst: Add topology ref history tracking for debugging
...an existing entry for this backtrace */ + for (i = 0; i < history->len; i++) { + if (history->entries[i].backtrace == backtrace) { + entry = &history->entries[i]; + break; + } + } + + /* Otherwise add one */ + if (!entry) { + struct drm_dp_mst_topology_ref_entry *new; + int new_len = history->len + 1; + + new = krealloc(history->entries, sizeof(*new) * new_len, + GFP_KERNEL); + if (!new) + goto fail_alloc; + + entry = &new[history->len]; + history->len = new_len; + history->entries = new; + + entry->backtrace = backtrace; + entry->ty...