diff --git a/include/kernel-5.4 b/include/kernel-5.4 index 82c8c7418..838d6376d 100644 --- a/include/kernel-5.4 +++ b/include/kernel-5.4 @@ -1,2 +1,2 @@ -LINUX_VERSION-5.4 = .278 -LINUX_KERNEL_HASH-5.4.278 = e5a00606115545f444ef2766af5652f5539e3c96f46a9778bede89b98ffb8588 +LINUX_VERSION-5.4 = .284 +LINUX_KERNEL_HASH-5.4.284 = 77221ab9aebeac746915c755ec3b7d320f85cd219c63d9c501820fbca1e3b32b diff --git a/target/linux/generic/backport-5.4/770-v5.12-net-bridge-notify-switchdev-of-disappearance-of-old-.patch b/target/linux/generic/backport-5.4/770-v5.12-net-bridge-notify-switchdev-of-disappearance-of-old-.patch index df4e74cd9..490229e8c 100644 --- a/target/linux/generic/backport-5.4/770-v5.12-net-bridge-notify-switchdev-of-disappearance-of-old-.patch +++ b/target/linux/generic/backport-5.4/770-v5.12-net-bridge-notify-switchdev-of-disappearance-of-old-.patch @@ -116,10 +116,10 @@ Signed-off-by: Jakub Kicinski --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c -@@ -581,6 +581,7 @@ void br_fdb_update(struct net_bridge *br - +@@ -589,6 +589,7 @@ /* fastpath: update of existing entry */ - if (unlikely(source != fdb->dst && !fdb->is_sticky)) { + if (unlikely(source != fdb->dst && + !test_bit(BR_FDB_STICKY, &fdb->flags))) { + br_switchdev_fdb_notify(fdb, RTM_DELNEIGH); fdb->dst = source; fdb_modified = true; diff --git a/target/linux/generic/backport-5.4/905-v6.10-bridge-add-support-for-sticky-fdb-entries.patch b/target/linux/generic/backport-5.4/905-v6.10-bridge-add-support-for-sticky-fdb-entries.patch new file mode 100644 index 000000000..a0a2be61d --- /dev/null +++ b/target/linux/generic/backport-5.4/905-v6.10-bridge-add-support-for-sticky-fdb-entries.patch @@ -0,0 +1,16 @@ +--- a/net/bridge/br_private.h ++++ b/net/bridge/br_private.h +@@ -193,7 +193,12 @@ + struct net_bridge_fdb_key key; + struct hlist_node fdb_node; + unsigned long flags; +- unsigned char offloaded:1; ++ unsigned char is_local:1, ++ is_static:1, ++ is_sticky:1, ++ added_by_user:1, ++ added_by_external_learn:1, ++ offloaded:1; + + /* write-heavy members should not affect lookups */ + unsigned long updated ____cacheline_aligned_in_smp; diff --git a/target/linux/generic/files-5.4/fs/ntfs3/bitmap.c b/target/linux/generic/files-5.4/fs/ntfs3/bitmap.c index aa1844075..3f7168fd8 100644 --- a/target/linux/generic/files-5.4/fs/ntfs3/bitmap.c +++ b/target/linux/generic/files-5.4/fs/ntfs3/bitmap.c @@ -661,7 +661,7 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits) wnd->total_zeroes = nbits; wnd->extent_max = MINUS_ONE_T; wnd->zone_bit = wnd->zone_end = 0; - wnd->nwnd = bytes_to_block(sb, bitmap_size(nbits)); + wnd->nwnd = bytes_to_block(sb, ntfs3_bitmap_size(nbits)); wnd->bits_last = nbits & (wbits - 1); if (!wnd->bits_last) wnd->bits_last = wbits; @@ -1323,7 +1323,7 @@ int wnd_extend(struct wnd_bitmap *wnd, size_t new_bits) return -EINVAL; /* Align to 8 byte boundary. */ - new_wnd = bytes_to_block(sb, bitmap_size(new_bits)); + new_wnd = bytes_to_block(sb, ntfs3_bitmap_size(new_bits)); new_last = new_bits & (wbits - 1); if (!new_last) new_last = wbits; diff --git a/target/linux/generic/files-5.4/fs/ntfs3/fsntfs.c b/target/linux/generic/files-5.4/fs/ntfs3/fsntfs.c index 6d02b2ce8..0089f448f 100644 --- a/target/linux/generic/files-5.4/fs/ntfs3/fsntfs.c +++ b/target/linux/generic/files-5.4/fs/ntfs3/fsntfs.c @@ -493,7 +493,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi) ni->mi.dirty = true; /* Step 2: Resize $MFT::BITMAP. */ - new_bitmap_bytes = bitmap_size(new_mft_total); + new_bitmap_bytes = ntfs3_bitmap_size(new_mft_total); err = attr_set_size(ni, ATTR_BITMAP, NULL, 0, &sbi->mft.bitmap.run, new_bitmap_bytes, &new_bitmap_bytes, true, NULL); diff --git a/target/linux/generic/files-5.4/fs/ntfs3/index.c b/target/linux/generic/files-5.4/fs/ntfs3/index.c index 6f81e3a49..3e736664c 100644 --- a/target/linux/generic/files-5.4/fs/ntfs3/index.c +++ b/target/linux/generic/files-5.4/fs/ntfs3/index.c @@ -1360,8 +1360,8 @@ static int indx_create_allocate(struct ntfs_index *indx, struct ntfs_inode *ni, alloc->nres.valid_size = alloc->nres.data_size = cpu_to_le64(data_size); - err = ni_insert_resident(ni, bitmap_size(1), ATTR_BITMAP, in->name, - in->name_len, &bitmap, NULL, NULL); + err = ni_insert_resident(ni, ntfs3_bitmap_size(1), ATTR_BITMAP, + in->name, in->name_len, &bitmap, NULL, NULL); if (err) goto out2; @@ -1422,8 +1422,9 @@ static int indx_add_allocate(struct ntfs_index *indx, struct ntfs_inode *ni, if (bmp) { /* Increase bitmap. */ err = attr_set_size(ni, ATTR_BITMAP, in->name, in->name_len, - &indx->bitmap_run, bitmap_size(bit + 1), - NULL, true, NULL); + &indx->bitmap_run, + ntfs3_bitmap_size(bit + 1), NULL, true, + NULL); if (err) goto out1; } @@ -1980,7 +1981,7 @@ static int indx_shrink(struct ntfs_index *indx, struct ntfs_inode *ni, if (err) return err; - bpb = bitmap_size(bit); + bpb = ntfs3_bitmap_size(bit); if (bpb * 8 == nbits) return 0; diff --git a/target/linux/generic/files-5.4/fs/ntfs3/ntfs_fs.h b/target/linux/generic/files-5.4/fs/ntfs3/ntfs_fs.h index d9d01ce03..0b11fcfa1 100644 --- a/target/linux/generic/files-5.4/fs/ntfs3/ntfs_fs.h +++ b/target/linux/generic/files-5.4/fs/ntfs3/ntfs_fs.h @@ -38,6 +38,7 @@ struct page; struct writeback_control; enum utf16_endian; +#define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_TYPE(u64)) #define MINUS_ONE_T ((size_t)(-1)) /* Biggest MFT / smallest cluster */ @@ -943,9 +944,9 @@ static inline bool run_is_empty(struct runs_tree *run) } /* NTFS uses quad aligned bitmaps. */ -static inline size_t bitmap_size(size_t bits) +static inline size_t ntfs3_bitmap_size(size_t bits) { - return ALIGN((bits + 7) >> 3, 8); + return BITS_TO_U64(bits) * sizeof(u64); } #define _100ns2seconds 10000000 diff --git a/target/linux/generic/files-5.4/fs/ntfs3/super.c b/target/linux/generic/files-5.4/fs/ntfs3/super.c index df22e1d28..a33732661 100644 --- a/target/linux/generic/files-5.4/fs/ntfs3/super.c +++ b/target/linux/generic/files-5.4/fs/ntfs3/super.c @@ -1100,7 +1100,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) /* Check bitmap boundary. */ tt = sbi->used.bitmap.nbits; - if (inode->i_size < bitmap_size(tt)) { + if (inode->i_size < ntfs3_bitmap_size(tt)) { err = -EINVAL; goto put_inode_out; } diff --git a/target/linux/generic/pending-5.4/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch b/target/linux/generic/pending-5.4/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch index bfa2d375e..65511b27d 100644 --- a/target/linux/generic/pending-5.4/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch +++ b/target/linux/generic/pending-5.4/762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch @@ -15,7 +15,7 @@ Reviewed-by: Vladimir Oltean --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c -@@ -102,42 +102,27 @@ int br_switchdev_set_port_flag(struct ne +@@ -102,44 +102,27 @@ return 0; } @@ -53,7 +53,8 @@ Reviewed-by: Vladimir Oltean - br_switchdev_fdb_call_notifiers(false, fdb->key.addr.addr, - fdb->key.vlan_id, - fdb->dst->dev, -- fdb->added_by_user, +- test_bit(BR_FDB_ADDED_BY_USER, +- &fdb->flags), - fdb->offloaded); + call_switchdev_notifiers(SWITCHDEV_FDB_DEL_TO_DEVICE, + fdb->dst->dev, &info.info, NULL); @@ -62,7 +63,8 @@ Reviewed-by: Vladimir Oltean - br_switchdev_fdb_call_notifiers(true, fdb->key.addr.addr, - fdb->key.vlan_id, - fdb->dst->dev, -- fdb->added_by_user, +- test_bit(BR_FDB_ADDED_BY_USER, +- &fdb->flags), - fdb->offloaded); + call_switchdev_notifiers(SWITCHDEV_FDB_ADD_TO_DEVICE, + fdb->dst->dev, &info.info, NULL); diff --git a/target/linux/generic/pending-5.4/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch b/target/linux/generic/pending-5.4/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch index 8b869dd8f..70c77a6be 100644 --- a/target/linux/generic/pending-5.4/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch +++ b/target/linux/generic/pending-5.4/764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch @@ -17,16 +17,16 @@ Signed-off-by: Tobias Waldekranz --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c -@@ -581,7 +581,7 @@ void br_fdb_update(struct net_bridge *br - +@@ -589,7 +589,7 @@ /* fastpath: update of existing entry */ - if (unlikely(source != fdb->dst && !fdb->is_sticky)) { + if (unlikely(source != fdb->dst && + !test_bit(BR_FDB_STICKY, &fdb->flags))) { - br_switchdev_fdb_notify(fdb, RTM_DELNEIGH); + br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH); fdb->dst = source; fdb_modified = true; /* Take over HW learned entry */ -@@ -697,7 +697,7 @@ static void fdb_notify(struct net_bridge +@@ -705,7 +705,7 @@ int err = -ENOBUFS; if (swdev_notify)